oh ffs, github's AI says to change it to x-access-token for Antora #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '20' | |
| - name: Enable Corepack and prepare pnpm | |
| run: | | |
| corepack enable | |
| corepack prepare pnpm@10.24.0 --activate | |
| - name: Configure PNPM_HOME and add to PATH | |
| run: | | |
| echo "PNPM_HOME=${HOME}/.local/share/pnpm" >> $GITHUB_ENV | |
| echo "${HOME}/.local/share/pnpm" >> $GITHUB_PATH | |
| - name: Setup pnpm global bin directory | |
| run: pnpm setup | |
| - name: Install Antora | |
| run: pnpm add -g antora | |
| - name: Install dependencies | |
| working-directory: ./site | |
| run: pnpm install | |
| - name: Build Antora site | |
| working-directory: ./site | |
| env: | |
| GIT_CREDENTIALS: "x-access-token:${{ secrets.ANTORA_GITHUB_TOKEN }}" | |
| run: pnpm exec antora --stacktrace antora-playbook.yml | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: site/build/site | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |