Sets up actions/cache for the pnpm store directory (default: ~/.pnpm-store).
- Caches pnpm's store to speed up installs in subsequent runs.
- Exports
PNPM_STORE_PATH(andnpm_config_store_dir) viaGITHUB_ENVso pnpm uses the same store path in later steps. - No-op when no
pnpm-lock.yamlis found. - Uses lockfile hash in the cache key for correctness.
Run after checkout; run before any pnpm install command.
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: 📦 Cache pnpm
uses: w5s/actions/cache-pnpm@main
with:
cache-path: .pnpm-store # optionalcache-path(optional): pnpm store directory to store/restore. Defaults to~/.pnpm-store.
- Use in projects that have
pnpm-lock.yaml(pnpm). Node/pnpm must be available (e.g. afterci-setup).