From a610d0e8e29aeceaabe55ab6e28c99bf160bc012 Mon Sep 17 00:00:00 2001 From: Felipe Zipitria Date: Sat, 24 Feb 2024 20:00:49 -0300 Subject: [PATCH] feat: dispatch event when documentation is updated Signed-off-by: Felipe Zipitria --- .github/workflows/gh-pages.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 2beeb1e1..c6fb999b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -5,7 +5,7 @@ name: Deploy Hugo site to Pages on: # Runs on pushes targeting the default branch push: - branches: [$default-branch] + branches: [main] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -74,3 +74,15 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + + dispatch: + runs-on: ubuntu-latest + needs: build + steps: + - name: Dispatch to workflows + run: | + curl -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token ${{ secrets.AUTH_TOKEN }}" \ + --request POST \ + --data '{"event_type": "documentation", "client_payload": { "updated": true}}' \ + https://api.github.com/repos/coreruleset/website/dispatches