fix: add telegram to deploy process
This commit is contained in:
27
.github/workflows/main.yaml
vendored
27
.github/workflows/main.yaml
vendored
@@ -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 }}
|
||||||
Reference in New Issue
Block a user