fix: add telegram to deploy process

This commit is contained in:
2025-06-19 16:25:56 +03:00
parent 8f0323f4f5
commit 5da5154315

View File

@@ -51,3 +51,30 @@ jobs:
- name: Start containers - name: Start containers
run: | run: |
docker compose -f docker-compose.yaml up -d docker compose -f docker-compose.yaml up -d
- name: Notify Telegram about success
if: success()
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT_ID }}
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
message: |
✅ Деплой успешно завершен!
Репозиторий: ${{ github.repository }}
Ветка: ${{ github.ref }}
Коммит: ${{ github.sha }}
Сервер: ${{ secrets.SERVER_IP }}
Путь: ${{ secrets.DEPLOY_PATH }}
- name: Notify Telegram about failure
if: failure()
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT_ID }}
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
message: |
❌ Деплой не удался!
Репозиторий: ${{ github.repository }}
Ветка: ${{ github.ref }}
Коммит: ${{ github.sha }}
Подробности: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}