Skip to content

publish-gh-pages: a deploy-only mode, so Pages is deployed from a job that runs no notebook code #233

Closed

Description

@mmcky

From the 2026-10-06 codebase review (finding M1; record: .qe/dev/log/2026-10-06-codebase-review.md, #220).

Problem

publish-gh-pages runs configure-pages, upload-pages-artifact and deploy-pages in one composite action (publish-gh-pages/action.yml:95-105), so a caller must build and deploy in the same job. That is why templates/publish.yml grants pages: write and id-token: write (:44-48) to the job that executes the notebooks.

GitHub's documented shape for Pages separates the two: the build job needs only contents: read, and the deploy job only deploys. The split does not protect the site's content, which the build produces either way. It keeps the Pages OIDC capability and the pages: write token away from code that runs at build time.

Proposal

Done when

  • templates/publish.yml builds without the pages or id-token permissions, and deploys from a job that runs no repository code.
  • By default publish-gh-pages behaves as it does now. The new mode is documented in docs/user/actions/publish-gh-pages.md and the CHANGELOG.
  • The template passes the harness's example check (actionlint).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsecurity

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions