-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add workflow to auto update docs (#541)
* docs: add workflow to auto update docs Signed-off-by: Charlie Egan <[email protected]> * Drop $ in single quote arg --------- Signed-off-by: Charlie Egan <[email protected]>
- Loading branch information
1 parent
f2d07d9
commit 5418cea
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 @@ | ||
# this workflow is used to update the Regal content at docs.styra.com | ||
# when it changes in this repo. | ||
name: Update Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update-docs: | ||
name: Update Docs | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Generate GitHub App Token | ||
id: generate_token | ||
uses: tibdex/github-app-token@v2 | ||
with: | ||
app_id: ${{ secrets.PLATFORM_AUTOMATION_GH_APP_ID }} | ||
private_key: ${{ secrets.PLATFORM_AUTOMATION_GH_APP_PEM_KEY }} | ||
|
||
- name: Trigger Update in docs repo | ||
run: | | ||
curl -X "POST" "https://api.github.com/repos/StyraInc/docs/actions/workflows/update-regal.yaml/dispatches" \ | ||
-H 'Accept: application/vnd.github+json' \ | ||
-H 'Authorization: Bearer ${{ steps.generate_token.outputs.token }}' \ | ||
-H 'X-Github-Api-Version: 2022-11-28' \ | ||
-H 'Content-Type: application/json; charset=utf-8' \ | ||
-d '{ | ||
"ref": "main", | ||
"inputs": { | ||
"version": "latest" | ||
} | ||
}' |