From f213397cce9ad1172bb0d4ee7deebad4bea6e371 Mon Sep 17 00:00:00 2001 From: selimyanat Date: Fri, 14 Mar 2025 13:30:45 +0100 Subject: [PATCH 1/8] cache .next/cache build directory --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbaa45e..879af28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,15 @@ jobs: - name: Run Tests (Webapp) run: npm test + - name: Cache Next.js build + uses: actions/cache@v3 + with: + path: .next/cache + key: ${{ runner.os }}-nextjs-${{ github.ref }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-nextjs-${{ github.ref }}- + ${{ runner.os }}-nextjs + - name: Build Webapp run: yarn build From 8199a320d6195fdf8ad2aabaa2ffe8319fd961ca Mon Sep 17 00:00:00 2001 From: selimyanat Date: Fri, 14 Mar 2025 13:36:57 +0100 Subject: [PATCH 2/8] cache .next/cache build directory --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 879af28..d3ae082 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,7 @@ jobs: - name: Run Tests (Webapp) run: npm test - - name: Cache Next.js build + - name: Restore cache Next.js build uses: actions/cache@v3 with: path: .next/cache @@ -86,6 +86,12 @@ jobs: - name: Build Webapp run: yarn build + - name: Store cache Next.js build + uses: actions/cache@v3 + with: + path: .next/cache + key: ${{ runner.os }}-nextjs-${{ github.ref }}-${{ github.sha }} + # Merge Blocker: Ensure Both Builds Pass merge_guard: name: Ensure All Jobs Passed From 9caa11cfd79a9c275e6ce98478dd2851d0f6fa34 Mon Sep 17 00:00:00 2001 From: selimyanat Date: Fri, 14 Mar 2025 13:43:27 +0100 Subject: [PATCH 3/8] cache .next/cache build directory --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3ae082..9ed6d62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,9 +78,8 @@ jobs: uses: actions/cache@v3 with: path: .next/cache - key: ${{ runner.os }}-nextjs-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.os }}-nextjs-${{ github.ref }} restore-keys: | - ${{ runner.os }}-nextjs-${{ github.ref }}- ${{ runner.os }}-nextjs - name: Build Webapp @@ -90,7 +89,7 @@ jobs: uses: actions/cache@v3 with: path: .next/cache - key: ${{ runner.os }}-nextjs-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.os }}-nextjs-${{ github.ref }} # Merge Blocker: Ensure Both Builds Pass merge_guard: From bd17cddd3a1d288930d8a5f93b7a26775731b6da Mon Sep 17 00:00:00 2001 From: selimyanat Date: Fri, 14 Mar 2025 15:27:47 +0100 Subject: [PATCH 4/8] cache .next/cache build directory --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ed6d62..8e9f691 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,9 +78,10 @@ jobs: uses: actions/cache@v3 with: path: .next/cache - key: ${{ runner.os }}-nextjs-${{ github.ref }} + key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('yarn.lock') }} restore-keys: | - ${{ runner.os }}-nextjs + ${{ runner.os }}-nextjs-${{ github.ref_name }}- + ${{ runner.os }}-nextjs- - name: Build Webapp run: yarn build @@ -89,7 +90,7 @@ jobs: uses: actions/cache@v3 with: path: .next/cache - key: ${{ runner.os }}-nextjs-${{ github.ref }} + key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('yarn.lock') }} # Merge Blocker: Ensure Both Builds Pass merge_guard: From 59716d1935051480437e9f457dd32b51fed0be86 Mon Sep 17 00:00:00 2001 From: selimyanat Date: Fri, 14 Mar 2025 16:13:53 +0100 Subject: [PATCH 5/8] cache .next/cache build directory --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e9f691..f111d1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,9 @@ jobs: - name: Run Tests (Webapp) run: npm test + - name: Debug Next.js Cache Directory + run: ls -la .next || echo "No cache directory found" + - name: Restore cache Next.js build uses: actions/cache@v3 with: From 7088eced0a0c81886e6f495962dac2e1e6f20eda Mon Sep 17 00:00:00 2001 From: selimyanat Date: Fri, 14 Mar 2025 16:17:33 +0100 Subject: [PATCH 6/8] cache .next/cache build directory --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f111d1a..0de1460 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,9 @@ jobs: ${{ runner.os }}-nextjs- - name: Build Webapp - run: yarn build + run: | + yarn build + ls -la - name: Store cache Next.js build uses: actions/cache@v3 From cd42197dce655c1b36d78cc41122ca797bb721dd Mon Sep 17 00:00:00 2001 From: selimyanat Date: Fri, 14 Mar 2025 16:22:56 +0100 Subject: [PATCH 7/8] cache .next/cache build directory --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0de1460..1791c4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,13 +75,13 @@ jobs: run: npm test - name: Debug Next.js Cache Directory - run: ls -la .next || echo "No cache directory found" + run: ls -la webapp/.next || echo "No cache directory found" - name: Restore cache Next.js build uses: actions/cache@v3 with: - path: .next/cache - key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('yarn.lock') }} + path: webapp/.next + key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('webapp/yarn.lock') }} restore-keys: | ${{ runner.os }}-nextjs-${{ github.ref_name }}- ${{ runner.os }}-nextjs- @@ -94,8 +94,8 @@ jobs: - name: Store cache Next.js build uses: actions/cache@v3 with: - path: .next/cache - key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('yarn.lock') }} + path: webapp/.next + key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('webapp/yarn.lock') }} # Merge Blocker: Ensure Both Builds Pass merge_guard: From 825ecf3bd40c8ad061c718db96dc8218867904f4 Mon Sep 17 00:00:00 2001 From: selimyanat Date: Fri, 14 Mar 2025 16:29:45 +0100 Subject: [PATCH 8/8] cache .next/cache build directory --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1791c4b..0c7096d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,9 +74,6 @@ jobs: - name: Run Tests (Webapp) run: npm test - - name: Debug Next.js Cache Directory - run: ls -la webapp/.next || echo "No cache directory found" - - name: Restore cache Next.js build uses: actions/cache@v3 with: