Skip to content

Commit a72cc04

Browse files
authored
cache .next/cache build directory (#6)
cache .next/cache build directory
1 parent dcc0750 commit a72cc04

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,25 @@ jobs:
7474
- name: Run Tests (Webapp)
7575
run: npm test
7676

77+
- name: Restore cache Next.js build
78+
uses: actions/cache@v3
79+
with:
80+
path: webapp/.next
81+
key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('webapp/yarn.lock') }}
82+
restore-keys: |
83+
${{ runner.os }}-nextjs-${{ github.ref_name }}-
84+
${{ runner.os }}-nextjs-
85+
7786
- name: Build Webapp
78-
run: yarn build
87+
run: |
88+
yarn build
89+
ls -la
90+
91+
- name: Store cache Next.js build
92+
uses: actions/cache@v3
93+
with:
94+
path: webapp/.next
95+
key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('webapp/yarn.lock') }}
7996

8097
# Merge Blocker: Ensure Both Builds Pass
8198
merge_guard:

0 commit comments

Comments
 (0)