Content
GitHub Actions CI
Automate testing, building, and deploying with GitHub Actions for pnpm/Next.js projects and beyond.
When to use
- Every repo with tests, linting, or type-checking that needs automated quality gates
- Projects deploying to Vercel, AWS, Azure, GCP, or any cloud provider (prefer OIDC when supported)
- Monorepos needing coordinated build/test across packages
- Libraries publishing to npm or GitHub Packages
When NOT to use
- Tiny scripts with no tests or deployment target
- Repos locked into another CI provider where migration cost exceeds benefit
- Builds requiring hardware GitHub-hosted runners cannot provide (use self-hosted instead)
Core concepts
A workflow is a YAML file in .github/workflows/ composed of triggers (on), jobs (parallel VMs), steps (sequential commands), and actions (reusable units). Caching restores files between runs using keys derived from lockfile hashes — cache hits skip expensive install/build steps.
Key updates (Apr 2026):
- Service containers support
entrypointandcommandkeys so you can override image defaults from workflow YAML (Docker Compose compatible). See docs: https://docs.github.com/actions/tutorials/use-containerized-services/use-docker-service-containers - Actions OIDC tokens now include repository custom properties as claims (GA Apr 2, 2026). Use repository properties to create attribute-based trust policies instead of enumerating repo names. Changelog: