Iran VPS cannot reach api.telegram.org, and sourcing backend .env broke on BOOKING_EXPIRY_CRON globs. Extract TELEGRAM_* safely over SSH and notify from the foreign act_runner instead.
32 lines
1.0 KiB
YAML
32 lines
1.0 KiB
YAML
name: Notify Telegram (manual)
|
|
|
|
# Lightweight check that deploy alerts work without rebuilding the admin image.
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
notify:
|
|
name: Send test deploy notification
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Notify Telegram
|
|
env:
|
|
DEPLOY_SHA: ${{ github.sha }}
|
|
DEPLOY_STATUS: success
|
|
DEPLOY_COMMIT_SUBJECT: manual notify test
|
|
SSH_KEY: ${{ secrets.VPS_SSH_KEY }}
|
|
VPS_HOST: ${{ secrets.VPS_HOST }}
|
|
VPS_USER: ${{ secrets.VPS_USER }}
|
|
run: |
|
|
set -euo pipefail
|
|
if ! command -v ssh >/dev/null 2>&1 || ! command -v scp >/dev/null 2>&1; then
|
|
apt-get update -qq
|
|
apt-get install -y -qq openssh-client
|
|
fi
|
|
export DEPLOY_VERSION="$(node -p "require('./package.json').version" 2>/dev/null || echo '?')"
|
|
chmod +x scripts/notify-via-vps.sh scripts/notify-ops-telegram.sh scripts/notify-deploy.sh
|
|
./scripts/notify-via-vps.sh
|