Skip to content

Commit d809489

Browse files
committed
ci: notify Telegram after Pages deployment
1 parent 6fc884b commit d809489

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,15 @@ jobs:
5050
- name: Deploy to GitHub Pages
5151
id: deployment
5252
uses: actions/deploy-pages@v4
53+
- name: Notify Telegram on successful deployment
54+
env:
55+
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
56+
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
57+
PAGE_URL: ${{ steps.deployment.outputs.page_url }}
58+
run: |
59+
curl --fail --silent --show-error \
60+
--request POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
61+
--data-urlencode "chat_id=${TELEGRAM_CHAT_ID}" \
62+
--data-urlencode "text=✅ Scripting 文档已部署成功
63+
${PAGE_URL}
64+
提交:${GITHUB_SHA::7}"

0 commit comments

Comments
 (0)