From 3e6245da282a6f37c168afc9cc4d35d8671c7a6b Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Tue, 3 Feb 2026 09:01:48 -0800 Subject: [PATCH] Add caching for Quartz setup in build workflow Cache the Quartz clone and node_modules to speed up subsequent builds. Only the content copy and build steps run on cache hit. Co-Authored-By: Claude Opus 4.5 --- .forgejo/workflows/build-blumeops.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/build-blumeops.yaml b/.forgejo/workflows/build-blumeops.yaml index 4f13779..dacf93a 100644 --- a/.forgejo/workflows/build-blumeops.yaml +++ b/.forgejo/workflows/build-blumeops.yaml @@ -40,13 +40,22 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Build Quartz site + # Cache Quartz installation (clone + node_modules) + # Key includes Quartz version; bump suffix to invalidate cache + - name: Restore Quartz cache + id: cache-quartz + uses: actions/cache@v4 + with: + path: /tmp/quartz + key: quartz-v4.0.8-1 + + - name: Setup Quartz + if: steps.cache-quartz.outputs.cache-hit != 'true' run: | - VERSION="${{ inputs.version }}" + echo "Cache miss - setting up Quartz..." echo "Node version: $(node --version)" echo "NPM version: $(npm --version)" - echo "Setting up Quartz..." # Clone Quartz from local mirror git clone --depth 1 https://forge.ops.eblu.me/eblume/quartz.git /tmp/quartz cd /tmp/quartz @@ -54,6 +63,13 @@ jobs: # Install dependencies npm ci + echo "Quartz setup complete" + + - name: Build docs + run: | + VERSION="${{ inputs.version }}" + cd /tmp/quartz + # Copy our configuration (lives in docs/ to keep repo root clean) cp "$GITHUB_WORKSPACE/docs/quartz.config.ts" . cp "$GITHUB_WORKSPACE/docs/quartz.layout.ts" .