Merge pull request #4090 from jeremymcs/perf/nextjs-build-cache
perf(ci): cache Next.js build artifacts with Blacksmith
This commit is contained in:
commit
94b3e8c59a
2 changed files with 31 additions and 0 deletions
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
22
.github/workflows/pipeline.yml
vendored
22
.github/workflows/pipeline.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue