From bf0fe74d07cb10f96943336f0050f436a087b511 Mon Sep 17 00:00:00 2001 From: Cameron Otsuka Date: Mon, 29 Dec 2025 23:18:00 -0800 Subject: [PATCH] separate search index into its own workflow step --- .github/workflows/deploy-to-ghpages.yml | 27 ++++++++----------------- package.json | 3 ++- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy-to-ghpages.yml b/.github/workflows/deploy-to-ghpages.yml index 24b4f8b..18fa45f 100644 --- a/.github/workflows/deploy-to-ghpages.yml +++ b/.github/workflows/deploy-to-ghpages.yml @@ -17,47 +17,36 @@ jobs: contents: read steps: - uses: actions/checkout@v6 - - uses: oven-sh/setup-bun@v2 - - - name: Restore bun dependency cache - uses: actions/cache@v5 + - uses: actions/cache@v5 with: path: node_modules/ key: bun-${{ hashFiles('bun.lock') }} restore-keys: | bun- - - name: Install dependencies run: bun install --frozen-lockfile - - name: Type check run: bun run typecheck - - - name: Test + - name: Run tests run: bun run test:run - - - name: Restore Astro image cache - uses: actions/cache@v5 + - uses: actions/cache@v5 with: path: .astro-cache/assets/ key: astro-images-${{ hashFiles('src/assets/**/*', 'content/**/*.gif', 'content/**/*.jpg', 'content/**/*.png', 'content/**/*.svg', 'content/**/*.webp') }} restore-keys: | astro-images- - - - name: Restore OpenGraph image cache - uses: actions/cache@v5 + - uses: actions/cache@v5 with: path: .og-cache/ key: og-images-${{ hashFiles('content/**/*.md', 'content/**/*.mdx') }} restore-keys: | og-images- - - - name: Build + - name: Build site pages run: bun run build - - - name: Upload artifact - uses: actions/upload-pages-artifact@v4 + - name: Build search index + run: bun run index + - uses: actions/upload-pages-artifact@v4 with: path: dist/ diff --git a/package.json b/package.json index ab69631..61b27a5 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,10 @@ "type": "module", "scripts": { "dev": "bunx --bun astro dev", - "build": "bunx --bun astro build && bunx --bun pagefind", + "build": "bunx --bun astro build", "preview": "bunx --bun astro preview", "astro": "bunx --bun astro", + "index": "bunx --bun pagefind", "lint": "bunx --bun eslint src/", "lint:fix": "bunx --bun eslint src/ --fix", "format": "bunx --bun prettier --write .", -- 2.52.0