Skip to content

Commit

Permalink
docs: add workflow to auto update docs (#541)
Browse files Browse the repository at this point in the history
* 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
charlieegan3 authored Feb 7, 2024
1 parent f2d07d9 commit 5418cea
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/update-docs.yaml
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"
}
}'

0 comments on commit 5418cea

Please sign in to comment.