From 7f077f7a7f154dfbe1c9822f94ce4a9076797b27 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Sun, 10 May 2026 23:02:56 +0200 Subject: [PATCH] Use GitHub App token for docs deployment to allow pushing to gh-pages --- .github/workflows/deploy-docs.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 770656b..1babb1a 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -27,6 +27,13 @@ jobs: name: Build and Deploy Documentation runs-on: ubuntu-latest steps: + - name: Generate app token + id: app-token + uses: actions/create-github-app-token@v3 + with: + client-id: ${{ secrets.RELEASE_APP_CLIENT_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + - name: Determine deployment target id: target run: | @@ -62,14 +69,17 @@ jobs: - name: Deploy versioned docs uses: peaceiris/actions-gh-pages@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ steps.app-token.outputs.token }} publish_dir: ./docs/book destination_dir: ${{ steps.target.outputs.destination }} keep_files: true - name: Update versions.json and root redirect if: steps.target.outputs.is_release == 'true' + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} run: | + git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/" git fetch origin gh-pages git worktree add /tmp/gh-pages gh-pages