From 45e3baafba07a4435b62f67b586de13e1108488a Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Fri, 12 Mar 2021 07:37:56 +0100 Subject: fix caching --- .github/workflows/sync-translated-content.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to '.github/workflows/sync-translated-content.yml') diff --git a/.github/workflows/sync-translated-content.yml b/.github/workflows/sync-translated-content.yml index d05f29eb65..f47e7f6e5c 100644 --- a/.github/workflows/sync-translated-content.yml +++ b/.github/workflows/sync-translated-content.yml @@ -28,16 +28,19 @@ jobs: with: node-version: "12" - - name: Cache node_modules - uses: actions/cache@v2.1.4 - id: cached-node_modules + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2.1.4 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: - path: | - **/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Install all yarn packages - if: steps.cached-node_modules.outputs.cache-hit != 'true' working-directory: ${{ github.workspace }}/mdn/content run: | yarn --frozen-lockfile -- cgit v1.2.3-54-g00ecf