Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Commit 45cef73

Browse files
authored
ci: Slack alert when Cloudflare Page deployment fails (#35)
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
1 parent ba81459 commit 45cef73

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,22 @@ jobs:
4444
projectName: spark-dashboard # Replace with your Cloudflare Pages project name
4545
directory: ./dist # Replace with your output directory after build
4646

47+
- if: failure()
48+
uses: slackapi/slack-github-action@v2.0.0
49+
with:
50+
method: chat.postMessage
51+
token: ${{ secrets.SLACK_BOT_TOKEN }}
52+
payload: |
53+
{
54+
"channel": "alerts",
55+
"text": "Deployment of `${{ github.event.repository.name }}` failed",
56+
"blocks": [
57+
{
58+
"type": "section",
59+
"text": {
60+
"type": "mrkdwn",
61+
"text": ":warning: *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Deployment of `${{ github.event.repository.name }}` failed>*"
62+
}
63+
}
64+
]
65+
}

0 commit comments

Comments
 (0)