Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v14] docs: configure second webhook in "Update docs webhook" job #48219

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading