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 <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-02-03 09:01:48 -08:00
commit 3e6245da28

View file

@ -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" .