-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (70 loc) · 2.29 KB
/
compile-docs.yaml
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
name: Compile docs to PDF
on:
push:
paths:
- ".github/workflows/compile-docs.yaml"
- "docs/**/*"
pull_request:
paths:
- ".github/workflows/compile-docs.yaml"
- "docs/**/*"
workflow_dispatch:
permissions:
contents: read
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache typst
id: cache-typst
uses: actions/cache@v4
with:
path: typst
key: linux-typst-0.12.0
- name: Download typst if uncached
if: steps.cache-typst.outputs.cache-hit != 'true'
# will I remember to update this version? no
run: |
curl -LO https://github.com/typst/typst/releases/download/v0.12.0/typst-x86_64-unknown-linux-musl.tar.xz
du -h typst-x86_64-unknown-linux-musl.tar.xz
tar -xf typst-x86_64-unknown-linux-musl.tar.xz
mv typst-x86_64-unknown-linux-musl/typst ./typst
- name: Cache IBM Plex
id: cache-ibm-plex
uses: actions/cache@v4
with:
path: ibm-plex
key: ibm-plex-6.3.0
- name: Download IBM Plex if uncached
if: steps.cache-ibm-plex.outputs.cache-hit != 'true'
run: |
curl -LO https://github.com/IBM/plex/releases/download/v6.3.0/TrueType.zip
du -h TrueType.zip
unzip TrueType.zip
mv TrueType ibm-plex
- name: Cache JetBrainsMono
id: cache-jetbrainsmononl-lf
uses: actions/cache@v4
with:
path: cache-jetbrainsmono
key: cache-jetbrainsmono-3.3.0
- name: Download JetBrainsMono if uncached
if: steps.cache-jetbrainsmono.outputs.cache-hit != 'true'
run: |
curl -LO https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/JetBrainsMono.zip
du -h JetBrainsMono.zip
unzip JetBrainsMono.zip -d jetbrains-mono
- name: Compile all typst documents
run: |
mkdir -p target/doc
for doc in doc/*; do
./typst compile "$doc" target/doc \
--font-path jetbrains-mono \
--font-path ibm-plex/IBM-Plex-Mono \
--font-path ibm-plex/IBM-Plex-Sans
done
- uses: actions/upload-artifact@v4
with:
name: doc
path: target/doc