From 0a6987ad74f265f837be0db58e46db94384c804a Mon Sep 17 00:00:00 2001 From: Pablo Espinosa Date: Fri, 20 Feb 2026 01:25:55 +0000 Subject: [PATCH] Added docs for pnpm --- examples.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/examples.md b/examples.md index c93c614..7c676d5 100644 --- a/examples.md +++ b/examples.md @@ -24,6 +24,7 @@ - [Node - Lerna](#node---lerna) - [Node - Yarn](#node---yarn) - [Node - Yarn 2](#node---yarn-2) +- [Node - pnpm](#node---pnpm) - [OCaml/Reason - esy](#ocamlreason---esy) - [PHP - Composer](#php---composer) - [Python - pip](#python---pip) @@ -409,6 +410,38 @@ The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/c ${{ runner.os }}-yarn- ``` +### Node - pnpm + +```yaml +steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + + - uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "dir=$(pnpm store path)" >> "$GITHUB_OUTPUT" + + - uses: actions/cache@v4 + id: cache-pnpm + with: + path: ${{ steps.pnpm-cache.outputs.dir }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + + - name: Install dependencies + run: pnpm install --frozen-lockfile +``` + ## OCaml/Reason - esy Esy allows you to export built dependencies and import pre-built dependencies.