Skip to content

Commit 46553ea

Browse files
authored
docs: use setup-node cache-dependency-path (#602)
1 parent 11bede6 commit 46553ea

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,13 @@ jobs:
263263
- name: Setup Node
264264
uses: actions/setup-node@v3
265265
with:
266-
node-version: '14'
267-
268-
- name: Cache dependencies
269-
uses: actions/cache@v2
270-
with:
271-
path: ~/.npm
272-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
273-
restore-keys: |
274-
${{ runner.os }}-node-
266+
node-version: '16'
267+
cache: 'npm'
268+
# The action defaults to search for the dependency file (package-lock.json,
269+
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its
270+
# hash as a part of the cache key.
271+
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
272+
cache-dependency-path: '**/package-lock.json'
275273
276274
- run: npm ci
277275
- run: hugo --minify

0 commit comments

Comments
 (0)