Skip to content

docs: add workflow to auto update docs (#541) #1

docs: add workflow to auto update docs (#541)

docs: add workflow to auto update docs (#541) #1

Workflow file for this run

# 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"
}
}'