Skip to content

Switch the Pages source to this workflow before deploying - #87

Merged
seanwevans merged 1 commit into
mainfrom
claude/pg-shell-github-pages-qwku01
Sep 4, 2026
Merged

seanwevans merged 1 commit into
mainfrom
claude/pg-shell-github-pages-qwku01

Conversation

@seanwevans

Copy link
Copy Markdown
Owner

The first Pages deployment (#86) went green without changing the live site.

The repository was building Pages from a branch, so Jekyll kept rendering README.md at https://seanwevans.github.io/pg_shell/ while actions/deploy-pages created a deployment against it and reported success. Nothing in the workflow run said the site was unchanged, which is the worst version of this failure: a green check and a stale site.

actions/configure-pages only chooses the source when it creates the Pages site. On a repository where Pages is already enabled it reads the existing config and moves on, leaving the branch build in place.

Change

One step in .github/workflows/pages.yml, between configure-pages and the artifact upload, that sets build_type explicitly using the pages: write permission the job already holds:

  • already workflow → no-op
  • anything else → PUT /repos/{owner}/{repo}/pages with build_type=workflow
  • API refuses → fail with the exact setting to change, rather than deploying into a void

The source is set correctly on this repository now (changed by hand), so this is a guard: it keeps a future flip from silently going green, and makes the workflow self-sufficient for anyone forking the repo.

Testing

The YAML parses and the inline script passes bash -n. The behaviour it guards against is what was observed on run 33911724911 — build and deploy both green, Reported success!, Evaluated environment url: https://seanwevans.github.io/pg_shell/, and curl still returning the Jekyll build.

No application code changes, so CI coverage is unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H8iHRyutFShXsSLQ2wSQe5


Generated by Claude Code

The first deployment went green without changing the live site. The repository
builds Pages from a branch, so Jekyll kept rendering README.md at
seanwevans.github.io/pg_shell/ while actions/deploy-pages created a deployment
and reported success against it. Nothing in the run says the site is unchanged,
which is the worst version of this failure.

actions/configure-pages only chooses the source when it creates the site, so an
already-enabled repository stays on its branch build. Set build_type explicitly
instead, using the pages: write permission the job already holds, and fail with
the exact setting to change if the API refuses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H8iHRyutFShXsSLQ2wSQe5
@seanwevans
seanwevans merged commit a3146b7 into main Sep 4, 2026
5 checks passed
@seanwevans
seanwevans deleted the claude/pg-shell-github-pages-qwku01 branch September 4, 2026 20:00

This branch was previously deployed

1 inactive deployment
github-pages — a7310d14 Deployed Sep 4, 2026 by seanwevans via deploy #3
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