Skip to content

Commit ebf8767

Browse files
committed
v5-deploy
1 parent 63b08d2 commit ebf8767

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy Quartz site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- v5
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0 # Fetch all history for git info
24+
- uses: actions/setup-node@v6
25+
with:
26+
node-version: 24
27+
- name: Cache dependencies
28+
uses: actions/cache@v5
29+
with:
30+
path: ~/.npm
31+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-node-
34+
- name: Cache Quartz plugins
35+
uses: actions/cache@v5
36+
with:
37+
path: .quartz/plugins
38+
key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }}
39+
restore-keys: |
40+
${{ runner.os }}-plugins-
41+
- name: Install Dependencies
42+
run: npm ci
43+
- name: Install Quartz plugins
44+
run: npx quartz plugin install
45+
- name: Build Quartz
46+
run: npx quartz build
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: public
51+
52+
deploy:
53+
needs: build
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)