Sending alerts about results of deployment to Telegram chat.
Are you familiar with situation when your deploy process takes several minutes and you're refreshing your page with workflows waiting for ✅ ? With that feature you'll be notified about result of deployment right in Telegram.

Are you familiar with situation when your deploy process takes several minutes and you're refreshing your page with workflows waiting for ✅ ? With that feature you'll be notified about result of deployment right in Telegram.
Prerequirements
I expect you to have:
- telegram bot with
TELEGRAM_TOKEN
- some GitHub Actions scripts for deploying your code
Set up secrets of your repository
- Go to repository
- Settings
- Press New repository secret
- Type
ALERTING_TELEGRAM_TOKEN
in name - Type your
TELEGRAM_TOKEN
from telegram bot into value field. - Press Add secret
- Add
TELEGRAM_LOG_CHAT_ID
the same way and put telegram chat id of yourself or of your log chat, where log messages will be sent to.
New .yml
file in .github/workflows
To receive alerts, we need to create new .yml
file, which be executed after our deployment.
So, let's create file, for example, tg_alert.yml
in .github/workflows
folder with following content:
Basically, it means following:
- Look at result of
deploy
workflow after its completing - If success, then send Successfully deployed 👍✅ to
TELEGRAM_LOG_CHAT_ID
- Else, send Failed to deploy 👎❌
As a result you will get this:
Voilà 🥳
You're receiving telegram alerts after your deployment