ci(deploy): subscribe MAX webhook after build
All checks were successful
Deploy Max Bot Test / deploy (push) Successful in 12s

webhook:subscribe is idempotent — MAX refreshes the endpoint on repeat calls. Skipped automatically when WEBHOOK_URL is empty or still default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
pkirillw
2026-06-18 00:42:51 +03:00
parent e4dcf0da5b
commit 98144779ef

View File

@@ -55,6 +55,18 @@ jobs:
docker compose up -d --build && \
docker image prune -f"
- name: Subscribe webhook in MAX
env:
WEBHOOK_URL: ${{ vars.WEBHOOK_URL }}
run: |
if [ -z "$WEBHOOK_URL" ] || echo "$WEBHOOK_URL" | grep -q 'your-tunnel-host'; then
echo "WEBHOOK_URL not set, skipping subscription"
exit 0
fi
ssh -i ~/.ssh/id_rsa -p ${{ vars.SERVER_PORT }} ${{ vars.SERVER_USER }}@${{ vars.SERVER_HOST }} "
cd /home/pkirillw/dockered-services/max-bot-test && \
docker compose exec -T app bin/console webhook:subscribe"
- name: Health check
run: |
ssh -i ~/.ssh/id_rsa -p ${{ vars.SERVER_PORT }} ${{ vars.SERVER_USER }}@${{ vars.SERVER_HOST }} "