Explorar o código

Update nextjs.yml

Aykut Saraç %!s(int64=2) %!d(string=hai) anos
pai
achega
1de7110be5
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      .github/workflows/nextjs.yml

+ 9 - 1
.github/workflows/nextjs.yml

@@ -35,7 +35,7 @@ jobs:
         run: |
           if [ -f "${{ github.workspace }}/yarn.lock" ]; then
             echo "manager=yarn" >> $GITHUB_OUTPUT
-            echo "command=install" >> $GITHUB_OUTPUT
+            echo "command=install --frozen-lockfile --production" >> $GITHUB_OUTPUT
             echo "runner=yarn" >> $GITHUB_OUTPUT
             exit 0
           elif [ -f "${{ github.workspace }}/package.json" ]; then
@@ -52,6 +52,14 @@ jobs:
         with:
           node-version: "16"
           cache: ${{ steps.detect-package-manager.outputs.manager }}
+      - name: Cache node_modules
+        uses: actions/cache@v3
+        with:
+          path: |
+            ~/.npm
+            ~/.cache/yarn
+          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}
+          restore-keys: ${{ runner.os }}-node-
       - name: Setup Pages
         uses: actions/configure-pages@v3
         with: