Skip to content

Commit

Permalink
docs: use setup-node cache-dependency-path (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
imomaliev committed Aug 27, 2022
1 parent 11bede6 commit 46553ea
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46553ea

Please sign in to comment.