All workCase 01 / 03

Cutting CI/CD from 20 minutes to 5

Builds at the agency took 20 minutes. I reworked the pipeline and its automation scripts, and now they take 5.

Context
Digital Agency
Role
Senior Frontend Developer
When
2023
Stack
GitHub Actions · Yarn
Before: 20mAfter: 5m

CI/CD build time, before and after: −75%.

01 · The problem

A 20-minute pipeline makes every fix, review and release wait. We could squeeze in 2–3 builds a day, and the 2–3 frontend developers who needed to deploy sat in the queue.

02 · Constraints

Same runner budget, same deploy target, same team habits. Releases couldn't pause while I fixed it.

03 · What I did

  1. Swap the package manager

    The old npm setup was the slowest step. Moving to a newer Yarn and tidying the packages did most of the cut.

  2. Frozen lockfile in CI

    The lockfile is committed and CI installs exactly what it lists, so the build can't drift back to slow.

04 · Result

  • 20m → 5m
    build time per run (−75%)
  • 2–3 → 6–8
    builds a day

05 · What I’d do differently

Measure first. Next time I'd time every step of the pipeline before changing anything, so data picks the fix, not a hunch.

Next caseSafer.Hardening auth on the frontend