Skip to content

Commit

Permalink
Update docs with deploy key (StyraInc#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlieegan3 authored and srenatus committed Oct 1, 2024
1 parent 9109e13 commit b3c44ee
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/update-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,14 @@ jobs:
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
- name: Save version
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"
}
}'
echo "VERSION={{ env.GITHUB_REF }}" > versions/regal
- name: Update docs
uses: leigholiver/commit-with-deploy-key@v1.0.3
with:
source: versions
destination_folder: versions
destination_repo: StyraInc/docs
deploy_key: ${{ secrets.STYRA_DOCS_DEPLOY_KEY }}

0 comments on commit b3c44ee

Please sign in to comment.