From 206efe78bb281d0b061013632858eb6eb016c448 Mon Sep 17 00:00:00 2001 From: saurabhraghuvanshii Date: Fri, 20 Dec 2024 01:09:51 +0530 Subject: [PATCH 1/2] fix: next.js cache issue --- .github/workflows/build-preview.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 481c85d24..b6e0cf36f 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -53,6 +53,9 @@ jobs: - name: Install dependencies run: yarn install --immutable + - name: Remove Next.js build cache + run: rm -rf .next/cache + - name: Build Site run: yarn run build env: From d3f2e37b22a7d7b1ca1ff096c19a297ac4455896 Mon Sep 17 00:00:00 2001 From: saurabhraghuvanshii Date: Fri, 20 Dec 2024 18:25:46 +0530 Subject: [PATCH 2/2] remove next cache from both file --- .github/workflows/build-preview.yml | 13 ------------- .github/workflows/production-deployment.yml | 10 ---------- 2 files changed, 23 deletions(-) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index b6e0cf36f..52a77469b 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -35,16 +35,6 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - name: Cache Next Build - uses: actions/cache@v4 - with: - path: | - ${{ steps.yarn-cache-dir-path.outputs.dir }} - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- - - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -53,9 +43,6 @@ jobs: - name: Install dependencies run: yarn install --immutable - - name: Remove Next.js build cache - run: rm -rf .next/cache - - name: Build Site run: yarn run build env: diff --git a/.github/workflows/production-deployment.yml b/.github/workflows/production-deployment.yml index feb48ac94..5480e59a0 100644 --- a/.github/workflows/production-deployment.yml +++ b/.github/workflows/production-deployment.yml @@ -26,16 +26,6 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - name: Cache Next Build - uses: actions/cache@v4 - with: - path: | - ${{ steps.yarn-cache-dir-path.outputs.dir }} - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- - - name: Setup Node.js uses: actions/setup-node@v4 with: