Skip to content

Commit cc9058c

Browse files
committed
CI tweaks
1 parent 163966c commit cc9058c

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/scripts/build-gallery.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ set -euo pipefail
33

44
mkdir -p _site
55

6+
# Use .fonts directory if present (CI downloads Fira fonts there)
7+
font_args=()
8+
if [ -d .fonts ]; then
9+
font_args=(--font-path .fonts)
10+
fi
11+
612
# Compile each gallery demo and generate a thumbnail
713
for src in gallery/*.typ; do
814
name=$(basename "$src" .typ)
915
echo "Compiling $name..."
10-
typst compile --root . "$src" "_site/${name}.pdf"
16+
typst compile --root . "${font_args[@]}" "$src" "_site/${name}.pdf"
1117
pdftoppm -png -singlefile -r 150 "_site/${name}.pdf" "_site/${name}"
1218
done
1319

.github/workflows/gallery.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@ jobs:
3434
- name: Install system dependencies
3535
run: |
3636
sudo apt-get update
37-
sudo apt-get install -y poppler-utils fonts-fira-sans
37+
sudo apt-get install -y poppler-utils
38+
39+
- name: Download Fira fonts
40+
run: |
41+
mkdir -p .fonts
42+
curl -sL "https://fonts.google.com/download?family=Fira+Sans" -o /tmp/fira-sans.zip
43+
curl -sL "https://fonts.google.com/download?family=Fira+Mono" -o /tmp/fira-mono.zip
44+
unzip -qo /tmp/fira-sans.zip -d .fonts/
45+
unzip -qo /tmp/fira-mono.zip -d .fonts/
3846
3947
- name: Build gallery
4048
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CLAUDE.local.md
99

1010
# GitHub Pages build output
1111
_site/
12+
.fonts/
1213

1314
# OS files
1415
.DS_Store

0 commit comments

Comments
 (0)