ci(deploy): subscribe MAX webhook after build
All checks were successful
Deploy Max Bot Test / deploy (push) Successful in 12s
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:
@@ -55,6 +55,18 @@ jobs:
|
|||||||
docker compose up -d --build && \
|
docker compose up -d --build && \
|
||||||
docker image prune -f"
|
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
|
- name: Health check
|
||||||
run: |
|
run: |
|
||||||
ssh -i ~/.ssh/id_rsa -p ${{ vars.SERVER_PORT }} ${{ vars.SERVER_USER }}@${{ vars.SERVER_HOST }} "
|
ssh -i ~/.ssh/id_rsa -p ${{ vars.SERVER_PORT }} ${{ vars.SERVER_USER }}@${{ vars.SERVER_HOST }} "
|
||||||
|
|||||||
Reference in New Issue
Block a user