-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add dispatch workflow to update docs website
Signed-off-by: Felipe Zipitria <[email protected]>
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Trigger documentation rebuild | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: [main] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Default to bash | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
# Build job | ||
dispatch: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # needed for triggering dispatch | ||
id-token: write | ||
steps: | ||
- uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
app-id: ${{ vars.APP_ID }} | ||
private-key: ${{ secrets.PRIVATE_KEY }} | ||
owner: ${{ github.repository_owner }} | ||
repositories: "coraza,coraza.io" | ||
|
||
- name: Dispatch to workflows | ||
run: | | ||
curl -X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
--data '{"event_type": "documentation", "client_payload": { "updated": true}}' \ | ||
"https://api.github.com/repos/$GITHUB_REPOSITORY_OWNER/coraza.io/dispatches" |