From ded1a5ffd44abb6b3127157d01269169da7543b1 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Wed, 15 Jan 2020 11:37:33 -0800 Subject: [PATCH] build: cache yarn directory instead of node_modules (#1404) --- .github/workflows/ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed0361c99a..ae119e472a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,15 +48,16 @@ jobs: uses: actions/setup-node@v1 with: node-version: 8.x - - name: Cache node_modules + - name: Determine Yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - name: Cache Yarn uses: actions/cache@v1 with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.OS }}-build-${{ env.cache-name }}- - ${{ runner.OS }}-build- - ${{ runner.OS }}- + ${{ runner.os }}-yarn- - name: Install bolt shell: bash run: |