Skip to content

Commit

Permalink
Added ssh key to workflow secret 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin op iMac committed Oct 30, 2023
1 parent 683c268 commit 5db3935
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@ jobs:
run: |
python3 -m pytest
- name: Add Linode server to known hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan 172.233.46.163 >> ~/.ssh/known_hosts
- name: Deploy to Linode
if: ${{ success() }}
run: |
ssh [email protected] 'cd /var/www/html/ && git pull origin main && systemctl restart gunicorn && systemctl restart nginx && gunicorn main:app --bind 0.0.0.0'
uses: [email protected]
with:
host: 172.233.46.163
username: root
key: ${{ secrets.GH_SECRET }}
port: 22
script: |
cd /var/www/html/
git pull origin main
systemctl restart gunicorn
systemctl restart nginx
gunicorn main:app --bind

0 comments on commit 5db3935

Please sign in to comment.