diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e14add275..fab425cfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 75ad95508..d1dd34ee2 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -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