CI: Fix deploy on schedule
All checks were successful
/ build (push) Successful in 12s

This commit is contained in:
jtbx 2024-02-01 20:11:25 +01:00
parent d5fc2adfe1
commit 8c2684abef

View file

@ -43,7 +43,7 @@ jobs:
hugo hugo
- name: Deploy - Prepare keys - name: Deploy - Prepare keys
if: github.event_name == 'push' || github.event_name == 'pull_request' if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
run: | run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
chmod 400 deploykey.priv chmod 400 deploykey.priv
@ -65,7 +65,7 @@ jobs:
--data '{ "body": "You can view your changes at https://staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/" }' --data '{ "body": "You can view your changes at https://staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/" }'
- name: Deploy - Upload to prod - name: Deploy - Upload to prod
if: github.event_name == 'push' && github.ref_name == 'main' if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'main'
run: | run: |
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" public/ ccchh-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/hamburg.ccc.de/ rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" public/ ccchh-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/hamburg.ccc.de/