Skip to content

Run CI only on PRs, and only the workflows a change needs - #336

Merged
sonyccd merged 2 commits into
mainfrom
ci-triggers
Oct 31, 2026
Merged

sonyccd merged 2 commits into
mainfrom
ci-triggers

Conversation

@sonyccd

@sonyccd sonyccd commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

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

Workflow Before After
CI (ci.yml) every PR and every push to main, all jobs PRs only, plus a manual run from the Actions tab. A changes job reads the PR's files: the app jobs skip when a PR changes only Markdown, docs/ (except docs/openapi.yaml, which openapi.test.ts reads), docs-site/, the issue templates or the other workflows, and the docs build runs only when docs-site/ changes
CI passed (new job) none always runs, waits on every CI job, and fails if any failed or was cancelled. Skipped jobs pass. This is the one check for the ruleset to require
Deploy to GitHub Pages every push to main only pushes that change docs-site/ or the workflow; manual run still there. The rest of the workflow stays stock
Claude Code Review every push, drafts included still every push, but skips drafts (marking one ready reviews it) and Dependabot PRs (no secrets, so it could only fail)

CI and the review now cancel an in-flight run when a newer push to the same PR replaces it.

Why not a workflow-level paths filter

A workflow skipped by paths never reports a status, so a required check would sit at "Expected" forever on a docs-only PR. Skipping at the job level with if reports "skipped", which counts as passing.

Ruleset follow-up (after merge)

The main ruleset only blocks deletion and force-pushes today. Requiring CI passed with "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 reports CI passed.

Unchanged, on purpose

  • CodeQL is the repo's default setup (Settings), not a file here. Its run on main keeps the alert baseline that PR scans compare against.
  • Claude Code (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.
  • Supabase Preview, Vercel, Fly and Codecov are app integrations, not workflows.

Trade-offs

  • Codecov gets no uploads from main any more, so its PR comparisons may report a missing base. Its statuses are informational (codecov.yml); the 80% gates stay the check.

Testing

  • actionlint 1.7.7 passes on every workflow.
  • The file classification was run locally against sample lists (Markdown only, a docs site page, openapi.yaml, web plus README, a Claude workflow, ci.yml, a migration, ui-mock.html), and each came out as expected.
  • This PR changes ci.yml, so every CI job and CI passed should 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

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>
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
longlines Ready Ready Preview Oct 31, 2026 6:38pm UTC

@supabase

supabase Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Updates to Preview Branch (ci-triggers) ↗︎

Deployments Status Updated
Database ✅ Sat, 31 Oct 2026 18:38:41 UTC
Services ✅ Sat, 31 Oct 2026 18:38:41 UTC
APIs ✅ Sat, 31 Oct 2026 18:38:41 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations ✅ Sat, 31 Oct 2026 18:38:41 UTC
Migrations ✅ Sat, 31 Oct 2026 18:38:41 UTC
Seeding ✅ Sat, 31 Oct 2026 18:38:41 UTC
Edge Functions ✅ Sat, 31 Oct 2026 18:39:22 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

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>
@sonyccd
sonyccd merged commit 3614df0 into main Oct 31, 2026
13 checks passed
@sonyccd
sonyccd deleted the ci-triggers branch October 31, 2026 18:42

This branch was successfully deployed

1 active deployment
Preview — 803ee296 Deployed Oct 31, 2026 by vercel[bot]
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