GitHub Actions guides
One guide per check in our CI study. Each fix is a few lines of YAML.
- How to cache dependencies in GitHub Actions (npm, pnpm, yarn)
Stop re-downloading node_modules on every run: the one-line setup-node cache, pnpm and yarn setups, actions/cache for everything else, and when not to cache.
- Cancel outdated GitHub Actions runs on pull requests with concurrency
Every push to a PR starts a new run while the old one keeps going. A 3-line concurrency group cancels it, without cancelling deploys on main.
- GitHub Actions timeout-minutes: the 6-hour default and how to set it
A hung job runs for 360 minutes by default. How timeout-minutes works for jobs and steps, how to pick a value, and what usually hangs.