Skip to content

Commit

Permalink
docs: configure second webhook in "Update docs webhook" job (#48219)
Browse files Browse the repository at this point in the history
  • Loading branch information
taraspos authored Oct 31, 2024
1 parent 180d6c3 commit 6ae5b45
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/update-docs-webhook.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Update docs webhook
on:
push:
paths:
- 'docs/**'
branches:
- master
- branch/v*
Expand All @@ -11,11 +13,19 @@ jobs:
name: Update docs webhook
runs-on: ubuntu-latest
environment: update-docs
strategy:
fail-fast: false
matrix:
webhooks:
- url_secret_name: DOCS_DEPLOY_HOOK
http_method: GET
- url_secret_name: AMPLIFY_DOCS_DEPLOY_HOOK
http_method: POST
steps:
- name: Call deployment webhook
env:
WEBHOOK_URL: ${{ secrets.DOCS_DEPLOY_HOOK }}
WEBHOOK_URL: ${{ secrets[matrix.webhooks.url_secret_name] }}
run: |
if curl --silent --fail --show-error "$WEBHOOK_URL" > /dev/null; then
if curl -X ${{ matrix.webhooks.http_method }} --silent --fail --show-error "$WEBHOOK_URL" > /dev/null; then
echo "Triggered successfully"
fi

0 comments on commit 6ae5b45

Please # to comment.