-
Notifications
You must be signed in to change notification settings - Fork 69
88 lines (72 loc) · 2.45 KB
/
build-manual.yml
File metadata and controls
88 lines (72 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Build Typst manual and upload artifact
on:
push:
branches:
- master
paths:
- 'manual/**'
pull_request:
branches:
- master
paths:
- 'manual/**'
workflow_dispatch:
permissions:
contents: write
env:
FONT_DIR: ".fonts"
FONT_VERSION: "v1"
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/cache@v5
with:
path: ${{ env.FONT_DIR }}
key: fonts-${{ runner.os }}-${{ env.FONT_VERSION }}
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y curl unzip
- name: Create font dir
run: |
mkdir -p "${{ env.FONT_DIR }}"
- name: Download Noto Serif CJK SC
run: |
curl -fL "https://github.com/notofonts/noto-cjk/releases/download/Serif2.003/09_NotoSerifCJKsc.zip" -o "${{ env.FONT_DIR }}/noto-serif-sc.zip"
- name: Download Noto Sans CJK SC
run: |
curl -fL "https://github.com/notofonts/noto-cjk/releases/download/Sans2.004/08_NotoSansCJKsc.zip" -o "${{ env.FONT_DIR }}/noto-sans-sc.zip"
- name: Download LXGW WenKai
run: |
curl -fL "https://github.com/lxgw/LxgwWenKai/releases/download/v1.521/lxgw-wenkai-v1.521.zip" -o "${{ env.FONT_DIR }}/lxgw-wenkai.zip"
- name: Download Courier Prime Code
run: |
curl -fL "https://quoteunquoteapps.com/courierprime/downloads/courier-prime-code.zip" -o "${{ env.FONT_DIR }}/courier-prime-code.zip"
- name: Install font
run: |
# Unzip everything
for z in "${{ env.FONT_DIR }}"/*.zip; do
[ -f "$z" ] || continue
echo "Unzipping $z"
unzip -o "$z" -d "${{ env.FONT_DIR }}" || true
done
sudo mkdir -p /usr/local/share/fonts/typst/
sudo cp -r "${{ env.FONT_DIR }}" /usr/local/share/fonts/typst
sudo fc-cache -f -v
- uses: actions/cache@v5
with:
path: ${{ env.FONT_DIR }}
key: fonts-${{ runner.os }}-${{ env.FONT_VERSION }}
- uses: typst-community/setup-typst@v4
- name: Build manual
run: |
typst compile "manual/src/content/manual.typ" "manual/llmanual.pdf" --features html
- name: Upload PDF
uses: actions/upload-artifact@v7
with:
name: llmanual.pdf
path: manual/llmanual.pdf