forked from OI-wiki/OI-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 2.34 KB
/
build-pdf.yml
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
name: Build LaTeX document
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: OI-Wiki LaTeX Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the LaTeX document
uses: OI-wiki/[email protected]
with:
latexmk_use_xelatex: true
latexmk_shell_escape: true
args: "-pdf -file-line-error -halt-on-error -interaction=nonstopmode -8bit"
extra_system_packages: |
unzip
wget
curl
coreutils
nodejs
npm
imagemagick
libwebp
librsvg
git
python3
py3-pygments
inkscape
libxml2
pre_compile: |
wget -q -O notosans.zip "https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip"
wget -q -O notoserif.zip "https://noto-website-2.storage.googleapis.com/pkgs/NotoSerif-hinted.zip"
wget -q -O notoserifcjk.zip "https://noto-website-2.storage.googleapis.com/pkgs/NotoSerifCJKsc-hinted.zip"
wget -q -O notosanscjk.zip "https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKsc-hinted.zip"
wget -q -O robotomono.zip "https://fonts.google.com/download?family=Roboto%20Mono"
wget -q "http://mirrors.ctan.org/fonts/cm-unicode.zip"
unzip -q notosans.zip -d notosans
unzip -q notoserif.zip -d notoserif
unzip -q notosanscjk.zip -d notosanscjk
unzip -q notoserifcjk.zip -d notoserifcjk
unzip -q robotomono.zip -d robotomono
unzip -q ./cm-unicode.zip
cp -r notosans notoserif notosanscjk notoserifcjk robotomono cm-unicode/fonts/otf/* /usr/share/fonts
fc-cache
git clone https://github.com/OI-wiki/OI-Wiki-export.git --depth=1
cd ./OI-Wiki-export/remark-latex
npm i
cd ../..
cd ./OI-Wiki-export/oi-wiki-export
python3 increase-mem-limit.py
fmtutil-sys --all
npm i
node index.js ../../
root_file: |
oi-wiki-export.tex
- uses: actions/upload-artifact@v2
with:
name: OI-wiki.pdf
path: ./OI-Wiki-export/oi-wiki-export/oi-wiki-export.pdf