Skip to content

Develop

Develop #3

Workflow file for this run

name: Deploy to EC2 on main
on:
pull_request:
branches: [ main ]
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- name: Run SSH Connection and Pull
uses: appleboy/[email protected]
with:
host: ${{ secrets.AWS_EC2_HOST }}
username: ${{ secrets.AWS_EC2_USERNAME }}
password: ${{ secrets.AWS_EC2_PASSWORD }}
port: ${{ secrets.AWS_EC2_SSH_PORT }}
script: |
cd project/BE
git fetch origin
git pull origin main
sudo systemctl restart gunicorn
sudo systemctl restart celery
sudo systemctl restart celerybeat