Skip to content

Build the site on pull requests without deploying - #297

Merged
nafg merged 1 commit into
mainfrom
build-site-on-prs
Oct 14, 2026
Merged

nafg merged 1 commit into
mainfrom
build-site-on-prs

Conversation

@nafg

@nafg nafg commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

The Pages workflow only ran on pushes to main and workflow_dispatch, so PRs never built the site. #236 (Ruby 4) merged with only the Mergify and CLA checks, and the deploy after it broke (see #296).

Changes to .github/workflows/pages.yml:

  • Add a pull_request trigger for all PRs, whatever their base branch, so stacked PRs are built too.
  • Run the deploy job only for a push or manual run on main. Any other event, including PRs and any trigger added later, builds without deploying.
  • Key the concurrency group by ref (pages-${{ github.ref }}) instead of the single pages group. Runs on main still cancel each other as before, but a PR build can't cancel an in-progress deployment of main.
  • Make the workflow read-only by default. Only the deploy job gets pages: write and id-token: write, because the build job now runs PR-controlled code (Gemfile, Jekyll plugins). build gets contents: read and pages: read, which configure-pages needs.

Note: main is still on Ruby 4, which can't build the site, so this PR's build check will fail until #296 is merged. After that, this branch should be rebased so the check runs on Ruby 3.4.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T04:35:11.031528Z 3aa701b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mergify

mergify Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3aa701bf10

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/pages.yml Outdated
@nafg
nafg force-pushed the build-site-on-prs branch 2 times, most recently from ccd6d5a to 097c936 Compare October 14, 2026 04:36
The Pages workflow only ran on pushes to main, so PRs (e.g. #236) merged
without the site ever being built. Run the build on all pull requests,
whatever their base branch, so stacked PRs are covered too. Deploy only
for a push or manual run on main, and key the concurrency group by ref
so a PR build can't cancel an in-progress deployment of main.

Since the build job now runs PR-controlled code, it only gets read
permissions; pages: write and id-token: write move to the deploy job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nafg
nafg force-pushed the build-site-on-prs branch from 097c936 to a5876f2 Compare October 14, 2026 04:39
@nafg
nafg merged commit e76ddfd into main Oct 14, 2026
5 checks passed
@nafg
nafg deleted the build-site-on-prs branch October 14, 2026 04:40
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