diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 78fa432..368847c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -69,6 +69,16 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: "pnpm" + - name: Restore cache + uses: actions/cache@v4 + with: + path: | + .next/cache + # Generate a new cache whenever packages or source files change. + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock','**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock','**/pnpm-lock.yaml') }}- - run: pnpm install --frozen-lockfile # - name: Set SENTRY_AUTH_TOKEN env if secret exists