Skip to content

Make GitHub Pages deployment opt-in until Pages is configured #26

Description

@konard

Finding

While fixing link-foundation/browser-commander#55, I compared Browser Commander docs deployment with this template. The template comments already note that a fresh repository fails if Settings -> Pages is not set to GitHub Actions, but the workflow still runs actions/deploy-pages unconditionally on pushes to main.

Evidence

Browser Commander run 28326104183 built docs successfully, then failed in actions/deploy-pages with HTTP 404 because the repository Pages site was not enabled/configured. The repository Pages API also returned 404.

The current Python template docs workflow has the same operational shape: build docs, configure/upload Pages on push to main, and deploy on push to main without an opt-in guard.

Suggested fix

Gate the configure/upload/deploy Pages steps on an explicit repository variable, for example vars.DEPLOY_GITHUB_PAGES == 'true', and add a non-failing skip step explaining how to enable deployment after Pages is configured. This preserves docs build validation while avoiding false failing CI on fresh repositories.

Related downstream fix

Browser Commander PR: link-foundation/browser-commander#56

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions