Skip to content

Commit d0d47c8

Browse files
committed
Quartz sync: Jun 2, 2025, 10:15 PM
1 parent b73a2f4 commit d0d47c8

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ jobs:
3030
- uses: actions/setup-node@v4
3131
with:
3232
node-version: 22
33+
34+
- name: Setup @antfu/ni #slidev
35+
run: npm i -g @antfu/ni
36+
3337
- name: Install Dependencies
34-
run: npm ci
38+
run: |
39+
npm ci
40+
npm install -D slidev
3541
3642
# - name: Fetch Quartz Theme
3743
# run: curl -s -S https://raw.githubusercontent.com/saberzero1/quartz-themes/master/action.sh | bash -s -- $THEME_NAME
@@ -43,6 +49,24 @@ jobs:
4349

4450
- name: Build Quartz
4551
run: npx quartz build
52+
53+
- name: Build all Slidev .md files
54+
run: |
55+
mkdir -p public/slidev
56+
find slides -type f -name "*.md" | while read file; do
57+
relpath="${file#slides/}" # e.g. topic1/sub/slide.md
58+
name="${relpath%.md}" # e.g. topic1/sub/slide
59+
outdir="dist/$name" # e.g. dist/topic1/sub/slide
60+
targetdir="public/slidev/$name" # e.g. public/slidev/topic1/sub/slide
61+
62+
echo "📦 Building $file → $targetdir"
63+
64+
npx slidev build "$file" --out "$outdir"
65+
66+
mkdir -p "$targetdir"
67+
cp -r "$outdir/"* "$targetdir/"
68+
done
69+
4670
- name: Upload artifact
4771
uses: actions/upload-pages-artifact@v3
4872
with:

0 commit comments

Comments
 (0)