ci: validate site builds on pull requests - #476
Merged
Shayne Boyer (spboyer) merged 3 commits intoAug 6, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a dedicated CI workflow to validate the Starlight documentation site (site/) on pull requests (and on pushes to main), enabling a required-check-safe “always reports” site build signal.
Changes:
- Added
.github/workflows/site-ci.ymlto runnpm ci+npm run buildfor the docs site when relevant files change. - Implemented a path filter so non-site PRs skip the expensive Node install/build while still producing a successful check.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/site-ci.yml | New PR-time site build workflow with path-based skip logic to support required status checks |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Low
This was referenced Jul 28, 2026
Adds a Site Build workflow that always runs on pull_request to main so it can serve as a required status check without deadlocking non-site PRs. A dorny/paths-filter step detects whether site/**, this workflow, or the Pages deploy workflow changed; if so the job runs `cd site && npm ci && npm run build`. Otherwise it emits a fast success. The existing pages.yml deploy path is unchanged. Closes #473 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 45a9e53c-b975-4847-b92a-0fcd2bd62b88
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 45a9e53c-b975-4847-b92a-0fcd2bd62b88
Shayne Boyer (spboyer)
force-pushed
the
spboyer-ci-validate-site-builds-on-prs
branch
from
August 6, 2026 22:22
0326462 to
1b811db
Compare
Shayne Boyer (spboyer)
deleted the
spboyer-ci-validate-site-builds-on-prs
branch
August 6, 2026 22:23
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (3)
.github/workflows/site-ci.yml:40
- On
pushevents,dorny/paths-filtertypically relies ongit diffbetween thebeforeandafterSHAs. With the defaultactions/checkoutshallow fetch, thebeforecommit often isn’t present, which can make the filter step fail and break the workflow run (even though the filter output isn’t needed onpushbecause later steps already run whengithub.event_name == 'push'). Consider addingif: github.event_name == 'pull_request'to theDetect site changesstep (simplest), or alternatively increase checkoutfetch-depthso the diff is always available.
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Detect site changes
id: filter
uses: dorny/paths-filter@0e4a8c6effa4802afeda77dc8d303f8176d7dfad # v3
.github/workflows/site-ci.yml:36
- The inline version comments (
# v7.0.1,# v7.0.0) are easy to let drift from the pinned SHAs and can be misleading during audits/upgrades. Consider updating them to the exact release/tag that the SHA corresponds to (or removing the version comment and relying on the SHA + Dependabot metadata) to keep the workflow self-consistent.
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
.github/workflows/site-ci.yml:50
- The inline version comments (
# v7.0.1,# v7.0.0) are easy to let drift from the pinned SHAs and can be misleading during audits/upgrades. Consider updating them to the exact release/tag that the SHA corresponds to (or removing the version comment and relying on the SHA + Dependabot metadata) to keep the workflow self-consistent.
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (3)
.github/workflows/site-ci.yml:33
ubuntu-latestcan change over time and introduce unexpected build failures when GitHub advances the default runner image. Consider pinning to a specific runner version (e.g.,ubuntu-24.04)—ideally matching whatever.github/workflows/pages.ymluses—to keep PR validation consistent with deploy behavior.
runs-on: ubuntu-latest
.github/workflows/site-ci.yml:36
- The workflow pins actions by commit SHA (good), but the inline version comments (
# v7.0.1,# v7.0.0) need to be accurate to avoid confusion during future upgrades/audits. Recommend verifying these SHAs correspond to the stated release tags (or updating the comments to the correct tag) so the annotations remain trustworthy.
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
.github/workflows/site-ci.yml:50
- The workflow pins actions by commit SHA (good), but the inline version comments (
# v7.0.1,# v7.0.0) need to be accurate to avoid confusion during future upgrades/audits. Recommend verifying these SHAs correspond to the stated release tags (or updating the comments to the correct tag) so the annotations remain trustworthy.
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
Comment on lines
+35
to
+40
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
|
|
||
| - name: Detect site changes | ||
| id: filter | ||
| uses: dorny/paths-filter@0e4a8c6effa4802afeda77dc8d303f8176d7dfad # v3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #473
Summary
Adds
.github/workflows/site-ci.yml— a PR-time validation workflow for the Starlight docs site that runscd site && npm ci && npm run buildso broken site changes are caught before merge instead of after.Design
The workflow is triggered on every
pull_requesttargetingmain, so it can safely be marked as a required status check without deadlocking non-site PRs. Inside the singlebuildjob:dorny/paths-filter@v3checks whether any of these paths changed:site/**(source,package.json,package-lock.json, config, content, e2e).github/workflows/site-ci.yml.github/workflows/pages.ymlpages.yml),npm ci,npm run build.The workflow also runs on
pushtomainwith the same path filter, so main-branch trend validation stays covered.Why this shape
Site Build / Build sitewithout stalling PRs that don't touch the site.site/**changed. No Node setup, nonpm ci..github/workflows/pages.yml), so nothing drifts between the PR check and the deploy path.pages.ymlstill owns the actual GitHub Pages deploy on push tomain.Acceptance criteria mapping
site/**(includingsite/package-lock.json),site-ci.yml, orpages.ymlbuild the docs site before merge.Site Build / Build sitecheck (fast skip), so it can be added to required checks without deadlock.site/**will now get the same PR-time build signal thatpages.ymlcurrently only provides after merge.Follow-ups (out of scope, noted in issue)
Site Build / Build siteto branch-protection required checks (requires repo-admin action).