Skip to content

Monorepo

Monorepo CI on GitHub Actions

One-line changes trigger a full-repository build.

120 → 5
Packages built
45m → 6m
Pipeline

One-line changes trigger a full-repository build.

Why it happens

There is no affected-target detection, so CI treats every push as a change to everything.

What to change

  1. Adopt affected detection — nx affected, turbo --filter, bazel query or pants --changed-since
  2. Use path filters so unrelated workflows do not trigger at all
  3. Share one warm cache across every package rather than caching per package
  4. Run the task graph on a single large runner instead of many small ones

Monorepo on runnerhut

yaml
jobs:
affected:
runs-on: runnerhut-32vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- run: npx nx affected -t lint test build --base=origin/main --parallel=16
A working starting point

The only runnerhut-specific line is `runs-on: runnerhut-32vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.