infra: add success/fail notifcation on deploy
All checks were successful
Deploy eolas-app / deploy (push) Successful in 53s
All checks were successful
Deploy eolas-app / deploy (push) Successful in 53s
This commit is contained in:
parent
4fd6b6e6e9
commit
5918b40d1e
1 changed files with 16 additions and 0 deletions
|
|
@ -19,3 +19,19 @@ jobs:
|
||||||
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{ vars.VPS_DEPLOY_USER }} "bash -c 'cd /var/www/eolas-app && rm -rf * .[^.]*'"
|
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{ vars.VPS_DEPLOY_USER }} "bash -c 'cd /var/www/eolas-app && rm -rf * .[^.]*'"
|
||||||
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-app/
|
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-app/
|
||||||
rm /tmp/ssh_key
|
rm /tmp/ssh_key
|
||||||
|
|
||||||
|
- name: Notify success
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
|
curl -u thomas:${{ secrets.NTFY_PASSWORD }} \
|
||||||
|
-H "Tags: Forgejo Runner" \
|
||||||
|
-d "🟩 eolas-app successfully deployed" \
|
||||||
|
https://ntfy.systemsobscure.net/eolas
|
||||||
|
|
||||||
|
- name: Notify failure
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
curl -u thomas:${{ secrets.NTFY_PASSWORD }} \
|
||||||
|
-H "Tags: Forgejo Runner" \
|
||||||
|
-d "🟥 An error occurred deploying eolas-app. See Forgejo Action logs." \
|
||||||
|
https://ntfy.systemsobscure.net/eolas
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue