quartz/.github/workflows/build-preview.yaml
saberzero1 d37f605bbc
Update GitHub Actions workflows for v5 branch and Git-based plugins
- Change branch references from v4 to v5

- Add plugin caching to speed up builds

- Use 'npx quartz plugin install' instead of 'restore'

- Update Docker workflow branch trigger
2026-02-08 13:19:56 +01:00

57 lines
1.3 KiB
YAML

name: Build Preview Deployment
on:
pull_request:
branches:
- v5
types: [opened, synchronize]
workflow_dispatch:
jobs:
build-preview:
if: ${{ github.repository == 'jackyzha0/quartz' }}
runs-on: ubuntu-latest
name: Build Preview
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 22
- name: Cache dependencies
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache Quartz plugins
uses: actions/cache@v5
with:
path: .quartz/plugins
key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
restore-keys: |
${{ runner.os }}-plugins-
- run: npm ci
- name: Install Quartz plugins
run: npx quartz plugin install
- name: Check types and style
run: npm run check
- name: Build Quartz
run: npx quartz build -d docs -v
- name: Upload build artifact
uses: actions/upload-artifact@v6
with:
name: preview-build
path: public