Просмотр исходного кода

cache node_modules/.cache in build-prod job

Yuki Takei 6 лет назад
Родитель
Сommit
398d179e04
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      .github/workflows/ci.yml

+ 7 - 0
.github/workflows/ci.yml

@@ -189,6 +189,13 @@ jobs:
       uses: actions/setup-node@v1
       uses: actions/setup-node@v1
       with:
       with:
         node-version: ${{ matrix.node-version }}
         node-version: ${{ matrix.node-version }}
+    - name: Cache/Restore node_modules/.cache
+      uses: actions/cache@v1
+      with:
+        path: node_modules/.cache
+        key: ${{ runner.OS }}-node_modules_cache-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
+        restore-keys: |
+          ${{ runner.os }}-node_modules_cache-${{ matrix.node-version }}-
     - name: Get yarn cache dir
     - name: Get yarn cache dir
       id: cache-yarn
       id: cache-yarn
       run: echo "::set-output name=dir::$(yarn cache dir)"
       run: echo "::set-output name=dir::$(yarn cache dir)"