Skip to content

Commit

Permalink
Update Node Windows example to find the npm cache (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Musil authored and GitHub committed Mar 19, 2020
1 parent b13df3f commit 22d71e3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,14 @@ For npm, cache files are stored in `~/.npm` on Posix, or `%AppData%/npm-cache` o
### Windows

```yaml
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
with:
path: ~\AppData\Roaming\npm-cache
key: ${{ runner.os }}-node-${{ hashFiles('**\package-lock.json') }}
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
```
Expand Down

0 comments on commit 22d71e3

Please sign in to comment.