瀏覽代碼

add discord notification

Aneurin Barker Snook 1 年之前
父節點
當前提交
6ec487bb30
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      .github/workflows/deploy-github-pages.yml

+ 14 - 0
.github/workflows/deploy-github-pages.yml

@@ -51,3 +51,17 @@ jobs:
       - name: Deploy to GitHub Pages
         id: deployment
         uses: actions/deploy-pages@v4
+
+  # https://github.com/annybs/notify-discord
+  notify:
+    name: Notify Discord
+    uses: annybs/notify-discord@develop
+    needs: deploy
+    if: ${{ always() }}
+    with:
+      discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}
+      repository: ${{ github.repository }}
+      result: ${{ needs.deploy.result }}
+      run_id: ${{ github.run_id }}
+      run_number: ${{ github.run_number }}
+      workflow: ${{ github.workflow }}