mirror of
https://github.com/quartz-community/demo-vault.git
synced 2026-07-22 03:00:28 +00:00
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: Deploy Quartz site to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- v5
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0 # Fetch all history for git info
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
- 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-
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
- name: Install Quartz plugins
|
|
run: npx quartz plugin install
|
|
- name: Build Quartz
|
|
run: npx quartz build
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: public
|
|
|
|
deploy:
|
|
needs: build
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|