Skip to content

Fix docs deployment to use the GitHub Pages artifact flow - #189

Closed
ajnebro with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deploy-github-actions-job
Closed

ajnebro with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deploy-github-actions-job

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown

The deploy Actions job was failing in GitHub Pages deployment because the workflow was still using mkdocs gh-deploy instead of the current artifact-based Pages flow. This updates the docs workflow to publish the built site through the supported upload-pages-artifact + deploy-pages path with the required permissions.

  • Root cause

    • The deploy job invoked mkdocs gh-deploy --force, which does not match the repository's current GitHub Pages deployment model and failed when actions/deploy-pages required OIDC-backed id-token: write.
  • Workflow changes

    • Keep docs generation in the build job with mkdocs build --strict
    • Configure Pages only for main branch pushes
    • Upload the generated site/ directory as the Pages artifact
    • Replace the custom gh-pages push step with actions/deploy-pages@v5
  • Permissions and environment

    • Set workflow-wide contents: read
    • Grant the deploy job the Pages-specific permissions:
      • pages: write
      • id-token: write
    • Attach the deploy job to the github-pages environment and expose the deployed URL
- name: Upload GitHub Pages artifact
  uses: actions/upload-pages-artifact@v4
  with:
    path: ./site

- name: Deploy to GitHub Pages
  id: deployment
  uses: actions/deploy-pages@v5

Co-authored-by: ajnebro <1889196+ajnebro@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job deploy Fix docs deployment to use the GitHub Pages artifact flow Sep 11, 2026
Copilot AI requested a review from ajnebro September 11, 2026 08:30
@ajnebro ajnebro closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants