Skip to content

Fix GitHub Pages deploy job OIDC permissions - #197

Open
ptrbortolotti with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-deploy-job-failure
Open

Fix GitHub Pages deploy job OIDC permissions#197
ptrbortolotti with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-deploy-job-failure

Conversation

Copilot AI commented Aug 6, 2026

Copy link
Copy Markdown

The build-pages workflow was uploading the Pages artifact successfully, then failing in deploy because actions/deploy-pages@v4 could not obtain an OIDC token. This change scopes the required Pages/OIDC permissions onto the deploy job so deployment can complete reliably.

  • Root cause

    • The failing job was the Pages publish step, not the docs build.
    • deploy-pages requires id-token: write in the job that performs the deployment.
  • Workflow changes

    • Added explicit job-level permissions to deploy in .github/workflows/gh-pages.yaml:
      • contents: read
      • pages: write
      • id-token: write
    • Kept the build/deploy split intact; only the permission boundary changed.
  • Repository hygiene

    • Ignored windIO/version.py, which is generated by setuptools-scm, to avoid committing local build artifacts unrelated to the workflow fix.
  • Relevant change

    deploy:
      needs: build
      permissions:
        contents: read
        pages: write
        id-token: write
      steps:
        - name: Deploy to GitHub Pages
          uses: actions/deploy-pages@v4

Copilot AI and others added 3 commits August 6, 2026 17:54
Co-authored-by: ptrbortolotti <20641647+ptrbortolotti@users.noreply.github.com>
Co-authored-by: ptrbortolotti <20641647+ptrbortolotti@users.noreply.github.com>
Co-authored-by: ptrbortolotti <20641647+ptrbortolotti@users.noreply.github.com>
Copilot AI changed the title Fix GitHub Pages deploy job permissions Fix GitHub Pages deploy job OIDC permissions Aug 6, 2026
Copilot AI requested a review from ptrbortolotti August 6, 2026 17:57
@ptrbortolotti
ptrbortolotti marked this pull request as ready for review August 6, 2026 18:02

@ptrbortolotti ptrbortolotti left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems legit?

@ptrbortolotti
ptrbortolotti requested review from rafmudaf and a lite review from Copilot August 6, 2026 18:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates repository hygiene and GitHub Pages deployment permissions.

Changes:

  • Ignore a generated/derived windIO/version.py file.
  • Add explicit permissions to the GitHub Pages deployment job.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
.gitignore Adds windIO/version.py to ignored files list.
.github/workflows/gh-pages.yaml Grants contents/pages/id-token permissions needed for Pages deployment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rafmudaf

rafmudaf commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

The docs workflow change looks good to me. On ignoring version.py, the explanation makes sense, but I'm not familiar with the setuptools-scm workflow. @fzahle may know more.

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.

4 participants