-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 762 Bytes
/
Copy pathdeploy.yml
File metadata and controls
33 lines (27 loc) · 762 Bytes
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
33
name: Deploy to EC2
on:
push:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: 13.53.39.27
username: ubuntu
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd /home/ubuntu/FastAPI_Boiler_Plate_Template
git pull origin main
cd backend
source venv/bin/activate
pip install -r requirements.txt
cd ../frontend
npm install
npm run build
sudo systemctl restart fastapi
sudo systemctl restart celery
sudo systemctl restart celerybeat
sudo systemctl restart nginx