Skip to content

Commit da2199f

Browse files
committed
a
1 parent 2a546a9 commit da2199f

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Wait for Deploy
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- pages-build-deployment
7+
types:
8+
- completed
9+
10+
jobs:
11+
notify:
12+
runs-on: ubuntu-latest
13+
environment: prod
14+
steps:
15+
- name: Send Telegram Message - Deploy Success
16+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
17+
uses: cbrgm/telegram-github-action@v1
18+
with:
19+
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
20+
to: ${{ vars.TELEGRAM_CHAT_ID }}
21+
thread-id: ${{ vars.MESSAGE_THREAD_ID_DEPLOY_THANHLV_BLOG }}
22+
message: "✅ Build uuid-tools.thanhlv.com with build number: ${{ github.event.workflow_run.run_number }}, Deploy to GitHub Pages completed successfully!"
23+
24+
- name: Send Telegram Message - Deploy Failed
25+
if: ${{ github.event.workflow_run.conclusion != 'success' }}
26+
uses: cbrgm/telegram-github-action@v1
27+
with:
28+
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
29+
to: ${{ vars.TELEGRAM_CHAT_ID }}
30+
thread-id: ${{ vars.MESSAGE_THREAD_ID_DEPLOY_THANHLV_BLOG }}
31+
message: "❌ Build uuid-tools.thanhlv.com with build number: ${{ github.event.workflow_run.run_number }}, Deploy to GitHub Pages failed with status: ${{ github.event.workflow_run.conclusion }}."

0 commit comments

Comments
 (0)