Skip to content

Commit

Permalink
show both possibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
beeequeue committed Jul 24, 2022
1 parent 5025263 commit 7384c5c
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion docs/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ steps:
```

**Caching pnpm (v6.10+) dependencies:**

It is possible to set up pnpm using [`corepack`](#corepack):

```yaml
# NOTE: pnpm caching support requires pnpm version >= 14.17
# NOTE: corepack requires node version >= 14.17
steps:
- uses: actions/checkout@v3
Expand All @@ -121,6 +124,29 @@ steps:
- run: pnpm test
```

Or you can use `pnpm/action-setup`:

```yaml
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# NOTE: pnpm caching support requires pnpm version >= 6.10.0
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.6.0
- uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm test
```

**Using wildcard patterns to cache dependencies**
```yaml
steps:
Expand Down

0 comments on commit 7384c5c

Please sign in to comment.