Skip to content

ci: skip the build matrix for documentation-only changes - #209

Merged
melihbirim merged 1 commit into
mainfrom
ci/skip-docs-only
Sep 30, 2026
Merged

melihbirim merged 1 commit into
mainfrom
ci/skip-docs-only

Conversation

@melihbirim

Copy link
Copy Markdown
Owner

A one-line edit to the website currently waits on thirteen jobs: Zig built and tested on three operating systems, the Node addon on three, the Python binding on four. Several minutes to approve a typo is how people stop fixing typos.

paths-ignore: &docs_only
  - 'docs/**'
  - '**.md'
  - '.gitignore'

Applied to both push and pull_request via a YAML anchor so the two lists cannot drift apart.

Why this is safe

Mixed PRs still run in full. paths-ignore skips a run only when every changed file matches. A PR touching src/engine.zig and README.md together runs everything.

Nothing in this workflow reads the ignored paths. I checked: the only mentions of .md in ci.yml are three comments pointing at CORRECTNESS.md. No step reads a markdown file or anything under docs/. The comment in the workflow says this, and says the list has to shrink if it stops being true.

No required status checks on main. This is the part worth knowing, because it is the usual way this change goes wrong: under branch protection, a skipped required check does not pass, it stays pending, and the PR waits forever. main has no protection today (gh api .../branches/main/protection returns 404), so skipping is genuinely skipping. If protection is ever turned on, the fix is a separate always-succeeding job with the same name, and that is written in the workflow comment so whoever enables it finds out there rather than from a stuck PR.

Docs still deploy. The Pages build is GitHub's own workflow, not this one.

Effect

This PR itself will run the full matrix, since it changes a workflow file rather than docs. #208 and every future docs change will not.

🤖 Generated with Claude Code

A one-line edit to the website or a README currently waits on thirteen
jobs: Zig built and tested on three operating systems, the Node addon on
three, and the Python binding on four. That is several minutes to approve a
typo, which is how people stop fixing typos.

paths-ignore skips a run only when every changed file matches, so a PR
touching src/ and README.md together still runs in full.

Nothing in this workflow reads a markdown file or anything under docs/ --
the only mentions are comments pointing at CORRECTNESS.md -- so no build
input is being ignored. The comment says so, and says the list has to
shrink if that stops being true.

Also noted in the comment: this is safe because main has no required status
checks. Under branch protection a skipped required check leaves a PR
waiting forever rather than passing, and the fix is a separate
always-succeeding job of the same name.

The Pages deploy is GitHub's own workflow, not this one, so documentation
still publishes exactly as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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