A Practical CI/CD Setup with GitHub Actions

A good pipeline should be boring: it runs, it passes, it deploys. Here’s a setup I reuse across projects.

The essentials

  1. Lint & type-check on every pull request.
  2. Run tests in parallel where possible.
  3. Build once, reuse the artifact for deploy.
  4. Deploy only from the main branch.

Keep it cacheable

Cache your package manager’s store and your build outputs. The difference between a 30-second and a 5-minute pipeline is mostly caching.

Automation is most valuable when nobody has to think about it.