Repository navigation
Run CI only on PRs, and only the workflows a change needs - #336
Merged
Merged
Conversation
CI no longer runs on pushes to main: a merge ships commits that passed it on their PR. It can still be run by hand. A path filter skips it for PRs that change only Markdown, docs/ (except openapi.yaml, which a test reads), the docs site or the other workflows. The docs site build moves to its own docs.yml, which runs only when docs-site/ changes, and the Pages deploy runs only on pushes that change the site. CI, the docs check and Claude Code Review cancel the run for a commit a newer push replaced. The review skips drafts (marking one ready reviews it) and Dependabot PRs, which get no secrets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Updates to Preview Branch (ci-triggers) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
A workflow-level paths filter never reports on a PR it skips, which would leave a required check waiting forever. CI now runs on every PR: a `changes` job sorts the PR's files and the app and docs jobs skip by `if`, which passes. `CI passed` waits on all of them and is the check for the main ruleset to require, with branches up to date, so two PRs that pass alone cannot break main together. The docs build is back in ci.yml as a job, and docs.yml is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Merges to main were re-running every check the PR had already passed, and every PR ran the full app CI and the Pages deploy whether or not it touched code or the site. This also sets CI up to be a required check, so two PRs that each pass alone can't break main together once a second person is working here.
What changes
ci.yml)changesjob reads the PR's files: the app jobs skip when a PR changes only Markdown,docs/(exceptdocs/openapi.yaml, whichopenapi.test.tsreads),docs-site/, the issue templates or the other workflows, and the docs build runs only whendocs-site/changesCI passed(new job)docs-site/or the workflow; manual run still there. The rest of the workflow stays stockCI and the review now cancel an in-flight run when a newer push to the same PR replaces it.
Why not a workflow-level
pathsfilterA workflow skipped by
pathsnever reports a status, so a required check would sit at "Expected" forever on a docs-only PR. Skipping at the job level withifreports "skipped", which counts as passing.Ruleset follow-up (after merge)
The
mainruleset only blocks deletion and force-pushes today. RequiringCI passedwith "Require branches to be up to date before merging" makes every PR pass CI on top of the current main before it merges. This repo is user-owned, so GitHub's merge queue isn't available. Turn the rule on only after this merges: until then no PR reportsCI passed.Unchanged, on purpose
claude.yml) fires on every comment and shows as "skipped" unless the comment says@claude. GitHub can't filter on comment text before a run starts, and a skipped run costs nothing.Trade-offs
codecov.yml); the 80% gates stay the check.Testing
actionlint1.7.7 passes on every workflow.openapi.yaml, web plus README, a Claude workflow,ci.yml, a migration,ui-mock.html), and each came out as expected.ci.yml, so every CI job andCI passedshould run on it. After merge, the Pages deploy should run once (this PR touches the site), and CI should not run on main.🤖 Generated with Claude Code