Merge branch 'staging' #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Production Deployment Workflow | |
on: | |
push: | |
branches: [master] | |
jobs: | |
deploy_job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: deploy to production server with ssh | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{secrets.PROD_HOST}} | |
username: ${{secrets.PROD_USER}} | |
key: ${{secrets.PROD_SSH_KEY}} | |
port: ${{secrets.PROD_PORT}} | |
script: | | |
sudo -u cosmos sh ~/deploy.sh | |
sudo systemctl restart gunicorn nginx | |
- name: wait for restart | |
run: sleep 10 | |
- name: check status code | |
uses: lakuapik/gh-actions-http-status@v1 | |
with: | |
sites: '["https://cosmostue.nl"]' | |
expected: "[200]" |