diff --git a/.github/workflows/update-docs.yaml b/.github/workflows/update-docs.yaml index 0ac8b2a2..ab6c5a4f 100644 --- a/.github/workflows/update-docs.yaml +++ b/.github/workflows/update-docs.yaml @@ -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 }}