Skip to content

CI: skip build/install steps for docs-only PRs#25

Merged
dubsector merged 3 commits into
mainfrom
ci/skip-build-for-docs-only
Jul 4, 2026
Merged

CI: skip build/install steps for docs-only PRs#25
dubsector merged 3 commits into
mainfrom
ci/skip-build-for-docs-only

Conversation

@dubsector

Copy link
Copy Markdown
Owner

Summary

  • The build job in ci.yml is a required status check, so a plain paths-ignore trigger would leave PRs that only touch README/docs stuck with an unfulfilled required check forever.
  • Instead, the job still always runs, but now diffs the PR base/head to check whether any of the paths that actually affect the build changed (src/, wrangler.toml, package.json, package-lock.json, build.mjs - same list as Cloudflare's "Build watch paths"), and skips the npm ci / npm run build steps when they didn't.
  • CodeQL scanning is untouched - it still runs on every PR regardless of what changed.

Test plan

  • This PR itself only touches .github/workflows/ci.yml, which isn't in the watch list, so the build check should complete quickly without an npm ci/npm run build step actually running - confirm in the Actions log.
  • A future docs-only PR (e.g. README) should show the same fast-skip behavior.
  • A future src/** change should still run the full install + build.

dubsector added 3 commits July 3, 2026 22:44
The "build" job is a required status check, so it must still run and
report on every PR (a paths-ignore trigger would leave it stuck
pending forever for README-only changes). Instead, diff against the
PR base to detect whether any of the paths that actually affect the
build changed, and skip npm ci/npm run build when they didn't -
mirrors Cloudflare's "Build watch paths" list.
@dubsector dubsector merged commit c818ff4 into main Jul 4, 2026
4 checks passed
@dubsector dubsector deleted the ci/skip-build-for-docs-only branch July 4, 2026 03:02
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