From d87cc5c15e66e7dde8fb47320d0e7d38df4903cd Mon Sep 17 00:00:00 2001 From: Taras <9948629+taraspos@users.noreply.github.com> Date: Thu, 31 Oct 2024 15:31:09 +0000 Subject: [PATCH] docs: configure second webhook in "Update docs webhook" job --- .github/workflows/update-docs-webhook.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-docs-webhook.yaml b/.github/workflows/update-docs-webhook.yaml index 47ff3f4bfb042..6ff9e5703107d 100644 --- a/.github/workflows/update-docs-webhook.yaml +++ b/.github/workflows/update-docs-webhook.yaml @@ -1,6 +1,8 @@ name: Update docs webhook on: push: + paths: + - 'docs/**' branches: - master - branch/v* @@ -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