Skip to content

Self-enable Pages in docs.yml (avoid bootstrap race)#72

Merged
JRS1986 merged 1 commit into
mainfrom
fix/pages-self-enable
May 19, 2026
Merged

Self-enable Pages in docs.yml (avoid bootstrap race)#72
JRS1986 merged 1 commit into
mainfrom
fix/pages-self-enable

Conversation

@JRS1986
Copy link
Copy Markdown
Owner

@JRS1986 JRS1986 commented May 19, 2026

Pass `enablement: true` to `actions/configure-pages@v5` so the first push to `main` on a fresh clone or fork auto-creates the Pages site rather than failing with "Get Pages site failed: Not Found".

This is the race that bit us on the PR #69 merge run: the workflow tried to deploy before the repo-level Pages toggle had been flipped. Subsequent runs went green after the manual settings change, but the next person to fork or re-clone would hit the same wall.

The action's own error message explicitly recommends this parameter:

Please verify that the repository has Pages enabled and configured to build using GitHub Actions, or consider exploring the `enablement` parameter for this action.

Behaviour

  • Repo already has Pages enabled (our state): `configure-pages` short-circuits — no change.
  • Repo doesn't have Pages enabled (fork / fresh clone): the action enables it. No more chicken-and-egg.

One-line workflow change plus a comment explaining why. No effect on Python CI or docs build.

Pass `enablement: true` to actions/configure-pages@v5 so the first push
to main on a fresh clone or fork auto-creates the Pages site rather
than failing with "Get Pages site failed: Not Found". This was the
race we hit between the PR #69 merge and the manual settings toggle
in this repo, and would otherwise bite anyone forking the project.

No behaviour change for already-enabled repos: configure-pages
short-circuits when the site exists.
@JRS1986 JRS1986 merged commit 14d9241 into main May 19, 2026
3 checks passed
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.

1 participant