Skip to content

Commit ccc0f41

Browse files
authored
docs: configure second webhook in "Update docs webhook" job (#48221)
1 parent f7a0cda commit ccc0f41

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/update-docs-webhook.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Update docs webhook
22
on:
33
push:
4+
paths:
5+
- 'docs/**'
46
branches:
57
- master
68
- branch/v*
@@ -11,11 +13,19 @@ jobs:
1113
name: Update docs webhook
1214
runs-on: ubuntu-latest
1315
environment: update-docs
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
webhooks:
20+
- url_secret_name: DOCS_DEPLOY_HOOK
21+
http_method: GET
22+
- url_secret_name: AMPLIFY_DOCS_DEPLOY_HOOK
23+
http_method: POST
1424
steps:
1525
- name: Call deployment webhook
1626
env:
17-
WEBHOOK_URL: ${{ secrets.DOCS_DEPLOY_HOOK }}
27+
WEBHOOK_URL: ${{ secrets[matrix.webhooks.url_secret_name] }}
1828
run: |
19-
if curl --silent --fail --show-error "$WEBHOOK_URL" > /dev/null; then
29+
if curl -X ${{ matrix.webhooks.http_method }} --silent --fail --show-error "$WEBHOOK_URL" > /dev/null; then
2030
echo "Triggered successfully"
2131
fi

0 commit comments

Comments
 (0)