docs: use setup-node cache-dependency-path (#602)
This commit is contained in:
parent
11bede66e7
commit
46553eae11
1 changed files with 7 additions and 9 deletions
16
README.md
16
README.md
|
@ -263,15 +263,13 @@ jobs:
|
|||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
node-version: '16'
|
||||
cache: 'npm'
|
||||
# The action defaults to search for the dependency file (package-lock.json,
|
||||
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its
|
||||
# hash as a part of the cache key.
|
||||
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
|
||||
cache-dependency-path: '**/package-lock.json'
|
||||
|
||||
- run: npm ci
|
||||
- run: hugo --minify
|
||||
|
|
Loading…
Reference in a new issue