Merge pull request #4090 from jeremymcs/perf/nextjs-build-cache

perf(ci): cache Next.js build artifacts with Blacksmith
This commit is contained in:
Jeremy McSpadden 2026-04-12 22:51:25 -05:00 committed by GitHub
commit 94b3e8c59a
2 changed files with 31 additions and 0 deletions

View file

@ -130,6 +130,15 @@ jobs:
- name: Install web host dependencies
run: npm --prefix web ci
- name: Cache Next.js build
uses: useblacksmith/cache@v5
with:
path: web/.next/cache
key: nextjs-${{ runner.os }}-${{ hashFiles('web/package-lock.json') }}-${{ hashFiles('web/app/**', 'web/components/**', 'web/lib/**', 'web/hooks/**') }}
restore-keys: |
nextjs-${{ runner.os }}-${{ hashFiles('web/package-lock.json') }}-
nextjs-${{ runner.os }}-
- name: Build
run: npm run build

View file

@ -24,6 +24,10 @@ jobs:
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
env:
BLACKSMITH_CACHE_TOKEN: ${{ env.BLACKSMITH_CACHE_TOKEN }}
BLACKSMITH_CACHE_URL: ${{ env.BLACKSMITH_CACHE_URL }}
GITHUB_REPO_NAME: ${{ github.repository }}
outputs:
dev-version: ${{ steps.stamp.outputs.version }}
steps:
@ -41,6 +45,15 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Cache Next.js build
uses: useblacksmith/cache@v5
with:
path: web/.next/cache
key: nextjs-${{ runner.os }}-${{ hashFiles('web/package-lock.json') }}-${{ hashFiles('web/app/**', 'web/components/**', 'web/lib/**', 'web/hooks/**') }}
restore-keys: |
nextjs-${{ runner.os }}-${{ hashFiles('web/package-lock.json') }}-
nextjs-${{ runner.os }}-
- name: Build
run: npm run build
@ -153,6 +166,15 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Cache Next.js build
uses: useblacksmith/cache@v5
with:
path: web/.next/cache
key: nextjs-${{ runner.os }}-${{ hashFiles('web/package-lock.json') }}-${{ hashFiles('web/app/**', 'web/components/**', 'web/lib/**', 'web/hooks/**') }}
restore-keys: |
nextjs-${{ runner.os }}-${{ hashFiles('web/package-lock.json') }}-
nextjs-${{ runner.os }}-
- name: Run live LLM tests (optional)
continue-on-error: true
run: npm run test:live