Skip to content

ci: skip the gates on a documentation-only change - #303

Merged
Sawtaytoes merged 1 commit into
mainfrom
t3code/docs-only-ci
Sep 2, 2026
Merged

ci: skip the gates on a documentation-only change#303
Sawtaytoes merged 1 commit into
mainfrom
t3code/docs-only-ci

Conversation

@Sawtaytoes

Copy link
Copy Markdown
Owner

No job in this workflow reads markdown. There is no markdownlint, no remark, no prettier over .md and no link check anywhere in this fleet, and Biome does not format markdown. A .md-only pull request therefore paid for a full run that never opened the file that changed, and merging one rebuilt and pushed a byte-identical image.

A new changes job computes the diff. The gates turn themselves off with if:.

Why not paths-ignore:

These gates are required status checks. The difference matters:

Posts a status context? Merge
Job skipped by if: Yesskipped, counted as success allowed
Workflow never started (paths-ignore:) No blocked forever, with no failure to explain why

Verified end to end on portly-controllers#17, which merged with CI / check (pull_request) reporting skipped and the branch protection satisfied.

Two files that look like documentation are not

  • .changeset/*.md is a release input.
  • .mdx is Storybook source and it compiles.

So the match is .md$, never .md*.

Fails safe

Anything the job cannot diff — a workflow_dispatch, a tag, a new branch whose before is all zeros, a base commit the fetch missed — runs the whole suite.

Scope

Fleet-wide change, one pull request per repository. This pull request is not documentation-only, so CI must run in full here.

No job here reads markdown. There is no markdownlint, no remark, no
prettier over `.md` and no link check anywhere in this fleet, and Biome
does not format markdown. A `.md`-only pull request therefore paid for a
full run that never opened the file that changed.

A new `changes` job computes the diff, and the gates turn themselves off
with `if:`.

`paths-ignore:` on the trigger would have been simpler and is wrong.
These gates are required status checks. A job skipped by `if:` still
posts its context - GitHub records `skipped` and counts it as success,
and Forgejo posts `skipped` and keeps the combined state green. A
workflow that never STARTED posts nothing at all, so a required check
stays pending and the pull request can never merge, with no failure to
explain why. Verified end to end on portly-controllers#17, which merged
with `CI / check (pull_request)` skipped.

Two files that look like documentation are not: `.changeset/*.md` is a
release input, and `.mdx` is Storybook source. The match is `.md$`, never
`.md*`.

The detector fails safe - no usable base commit runs the whole suite.
@Sawtaytoes
Sawtaytoes merged commit ad98471 into main Sep 2, 2026
2 checks passed
@Sawtaytoes
Sawtaytoes deleted the t3code/docs-only-ci branch September 2, 2026 06:10
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