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
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '16'
|
||||||
|
cache: 'npm'
|
||||||
- name: Cache dependencies
|
# The action defaults to search for the dependency file (package-lock.json,
|
||||||
uses: actions/cache@v2
|
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its
|
||||||
with:
|
# hash as a part of the cache key.
|
||||||
path: ~/.npm
|
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
cache-dependency-path: '**/package-lock.json'
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-node-
|
|
||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: hugo --minify
|
- run: hugo --minify
|
||||||
|
|
Loading…
Reference in a new issue