Skip to content

Commit 0cc8236

Browse files
authored
Merge pull request #172 from paritytech/ci/next-build-cache
ci: cache Next.js build between playground CI runs
2 parents 681e427 + d269aa5 commit 0cc8236

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ jobs:
117117
working-directory: playground
118118
run: yarn install --frozen-lockfile
119119

120+
- name: Cache Next.js build
121+
uses: actions/cache@v4
122+
with:
123+
path: playground/.next/cache
124+
key: ${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-${{ hashFiles('playground/src/**', 'playground/scripts/**', 'playground/public/**', 'playground/next.config.js', 'playground/tsconfig.json', 'playground/package.json') }}
125+
restore-keys: |
126+
${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-
127+
120128
- name: Build
121129
working-directory: playground
122130
run: yarn build

.github/workflows/deploy-docs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ jobs:
4646
working-directory: playground
4747
run: yarn install --frozen-lockfile
4848

49+
- name: Cache Next.js build
50+
uses: actions/cache@v4
51+
with:
52+
path: playground/.next/cache
53+
key: ${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-${{ hashFiles('playground/src/**', 'playground/scripts/**', 'playground/public/**', 'playground/next.config.js', 'playground/tsconfig.json', 'playground/package.json') }}
54+
restore-keys: |
55+
${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-
56+
4957
- name: Build playground (static export)
5058
working-directory: playground
5159
env:

.github/workflows/deploy-playground.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ jobs:
4646
working-directory: playground
4747
run: yarn install --frozen-lockfile
4848

49+
- name: Cache Next.js build
50+
uses: actions/cache@v4
51+
with:
52+
path: playground/.next/cache
53+
key: ${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-${{ hashFiles('playground/src/**', 'playground/scripts/**', 'playground/public/**', 'playground/next.config.js', 'playground/tsconfig.json', 'playground/package.json') }}
54+
restore-keys: |
55+
${{ runner.os }}-nextjs-${{ hashFiles('playground/yarn.lock') }}-
56+
4957
- name: Build playground
5058
working-directory: playground
5159
run: yarn build

0 commit comments

Comments
 (0)