Skip to content

Commit 1b2133f

Browse files
committed
Added webhook for deployment fail
1 parent b13e808 commit 1b2133f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,13 @@ jobs:
3030
- name: Deploy Site
3131
run: ssh my-droplet '~/redeploy-site.sh'
3232

33-
- name: Discord Webhook
34-
run: curl -s -X POST "${{ secrets.DISCORD_WEBHOOK }}" -d "content=🚀 Deployment Successful"
33+
- name: Discord Webhook Success
34+
run: curl -s -X POST "${{ secrets.DISCORD_WEBHOOK }}" -d "content=🚀 Deployment Successful"
35+
36+
deploy-fail:
37+
runs-on: ubuntu-latest
38+
needs: [deploy]
39+
if: ${{ always() && contains(needs.*.result, 'failure') }}
40+
steps:
41+
- name: Discord Webhook Fail
42+
run: curl -s -X POST "${{ secrets.DISCORD_WEBHOOK }}" -d "content=🚨 Deployment Failed"

0 commit comments

Comments
 (0)