Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: update cache step example for yarn
  • Loading branch information
Shohei Ueda authored and GitHub committed Nov 13, 2019
1 parent 20ef467 commit 8dc241e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -486,11 +486,15 @@ jobs:
with:
node-version: '10.x'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
Expand Down

0 comments on commit 8dc241e

Please sign in to comment.