From 98144779efd8a7019ea4a52ac7a619a4e5cb1279 Mon Sep 17 00:00:00 2001 From: pkirillw Date: Thu, 18 Jun 2026 00:42:51 +0300 Subject: [PATCH] ci(deploy): subscribe MAX webhook after build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .gitea/workflows/deploy.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 44bcc43..5774516 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -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 }} "