-
Notifications
You must be signed in to change notification settings - Fork 39
41 lines (37 loc) · 1.18 KB
/
update-docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# 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
permissions:
actions: write
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"
}
}'