-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (29 loc) · 1.13 KB
/
deploy-action.yml
File metadata and controls
32 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Deploy alerting
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
push:
branches:
- main
- develop
jobs:
test:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install -r requirements.txt
- name: Show Pytest Version
run: pytest --version
- name: Run tests
run: pytest tests.py
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- run: ssh -i ~/.ssh/id_rsa root@38.0.101.76 "cd /home/ubuntu/sentimental_analyses && git pull origin main && ./install.sh"