Skip to content

Merge pull request #51 from supermandee/dev #19

Merge pull request #51 from supermandee/dev

Merge pull request #51 from supermandee/dev #19

Workflow file for this run

name: Deploy to EC2 (PROD)
on:
push:
branches: [ main ]
permissions:
contents: read
deployments: write
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: production
steps:
- uses: actions/checkout@v3
- name: Deploy to EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ubuntu
key: ${{ secrets.SSH_KEY }}
script: |
cd /home/ubuntu/myspotipal
git pull origin main
source venv/bin/activate
pip install -r requirements.txt
sudo systemctl restart myspotipal.service
sudo systemctl restart nginx
sudo systemctl status myspotipal.service