-
Notifications
You must be signed in to change notification settings - Fork 30
389 lines (303 loc) · 16.7 KB
/
compile.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
name: Compile LaTeX
on:
# Trigger the workflow on push, but only for the main branch
push:
branches:
- main
jobs:
compile-latex:
name: Compile LaTeX
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: "1.16.x"
# - name: Set up GhostScript optimiser
# run: sudo apt-get update && sudo apt-get install ghostscript
- name: Get Go dependencies
run: go get ./...
- name: Download pdf2htmlEX
run: |
wget -O pdf2htmlEX.AppImage https://github.com/pdf2htmlEX/pdf2htmlEX/releases/download/v0.18.8.rc1/pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-bionic-x86_64.AppImage
chmod +x pdf2htmlEX.AppImage
- name: Install FUSE for AppImage
run: |
sudo add-apt-repository universe
sudo apt install libfuse2
- name: Set up TikZ folders
run: go run . setup
# Files are separated into different build steps
# so we can track the time taken to compile each step.
- name: Compile Numbers and Sets
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/ns/main.tex
- name: Compile Differential Equations
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/de/main.tex
- name: Compile Groups
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/groups/main.tex
- name: Compile Vectors and Matrices
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/vm/main.tex
- name: Compile Dynamics and Relativity
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/dr/main.tex
- name: Compile Probability
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/probability/main.tex
- name: Compile Vector Calculus
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/vc/main.tex
- name: Compile Analysis I
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/analysis/main.tex
- name: Compile Optimisation
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/opt/main.tex
- name: Compile Variational Principles
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/vp/main.tex
- name: Compile Markov Chains
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/markov/main.tex
- name: Compile Analysis and Topology
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/antop/main.tex
- name: Compile Methods
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/methods/main.tex
- name: Compile Quantum Mechanics
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/quantum/main.tex
- name: Compile Linear Algebra
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/linalg/main.tex
- name: Compile Groups, Rings and Modules
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/grm/main.tex
- name: Compile Complex Analysis
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/ca/main.tex
- name: Compile Geometry
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/geom/main.tex
- name: Compile Statistics
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/stats/main.tex
- name: Compile Algebraic Topology
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/algtop/main.tex
- name: Compile Probability and Measure
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/pm/main.tex
- name: Compile Graph Theory
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/graph/main.tex
- name: Compile Automata and Formal Languages
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/afl/main.tex
- name: Compile Galois Theory
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/galois/main.tex
- name: Compile Coding and Cryptography
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/cc/main.tex
- name: Compile Quantum Information and Computation
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/qic/main.tex
- name: Compile Logic and Set Theory
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/lst/main.tex
- name: Compile Algebraic Geometry (Part II)
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/alggeom/main.tex
- name: Compile Number Fields
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/nf/main.tex
- name: Compile Commutative Algebra
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: iii/commalg/main.tex
- name: Compile Algebraic Geometry (Part III)
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: iii/alggeom/main.tex
- name: Compile Model Theory and Non-Classical Logic
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: iii/mtncl/main.tex
- name: Compile Category Theory
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: iii/cat/main.tex
- name: Compile IA book
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ia/book/main.tex
- name: Compile IB book
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ib/book/main.tex
- name: Compile II book
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: ii/book/main.tex
- name: Compile III book
uses: xu-cheng/latex-action@v2
with:
args: -shell-escape -xelatex -file-line-error -halt-on-error -interaction=nonstopmode -cd -output-directory=build
root_file: iii/book/main.tex
- name: Convert Numbers and Sets to HTML
run: ./pdf2htmlEX.AppImage ia/ns/build/main.pdf ia_ns.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Differential Equations to HTML
run: ./pdf2htmlEX.AppImage ia/de/build/main.pdf ia_de.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Groups to HTML
run: ./pdf2htmlEX.AppImage ia/groups/build/main.pdf ia_groups.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Vectors and Matrices to HTML
run: ./pdf2htmlEX.AppImage ia/vm/build/main.pdf ia_vm.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Dynamics and Relativity to HTML
run: ./pdf2htmlEX.AppImage ia/dr/build/main.pdf ia_dr.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Probability to HTML
run: ./pdf2htmlEX.AppImage ia/probability/build/main.pdf ia_probability.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Vector Calculus to HTML
run: ./pdf2htmlEX.AppImage ia/vc/build/main.pdf ia_vc.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Analysis I to HTML
run: ./pdf2htmlEX.AppImage ia/analysis/build/main.pdf ia_analysis.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Optimisation to HTML
run: ./pdf2htmlEX.AppImage ib/opt/build/main.pdf ib_opt.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Variational Principles to HTML
run: ./pdf2htmlEX.AppImage ib/vp/build/main.pdf ib_vp.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Markov Chains to HTML
run: ./pdf2htmlEX.AppImage ib/markov/build/main.pdf ib_markov.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Analysis and Topology to HTML
run: ./pdf2htmlEX.AppImage ib/antop/build/main.pdf ib_antop.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Methods to HTML
run: ./pdf2htmlEX.AppImage ib/methods/build/main.pdf ib_methods.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Quantum Mechanics to HTML
run: ./pdf2htmlEX.AppImage ib/quantum/build/main.pdf ib_quantum.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Linear Algebra to HTML
run: ./pdf2htmlEX.AppImage ib/linalg/build/main.pdf ib_linalg.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Groups, Rings and Modules to HTML
run: ./pdf2htmlEX.AppImage ib/grm/build/main.pdf ib_grm.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Complex Analysis to HTML
run: ./pdf2htmlEX.AppImage ib/ca/build/main.pdf ib_ca.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Geometry to HTML
run: ./pdf2htmlEX.AppImage ib/geom/build/main.pdf ib_geom.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Statistics to HTML
run: ./pdf2htmlEX.AppImage ib/stats/build/main.pdf ib_stats.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Algebraic Topology to HTML
run: ./pdf2htmlEX.AppImage ii/algtop/build/main.pdf ii_algtop.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Probability and Measure to HTML
run: ./pdf2htmlEX.AppImage ii/pm/build/main.pdf ii_pm.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Graph Theory to HTML
run: ./pdf2htmlEX.AppImage ii/graph/build/main.pdf ii_graph.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Automata and Formal Languages to HTML
run: ./pdf2htmlEX.AppImage ii/afl/build/main.pdf ii_afl.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Galois Theory to HTML
run: ./pdf2htmlEX.AppImage ii/galois/build/main.pdf ii_galois.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Coding and Cryptography to HTML
run: ./pdf2htmlEX.AppImage ii/cc/build/main.pdf ii_cc.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Quantum Information and Computation to HTML
run: ./pdf2htmlEX.AppImage ii/qic/build/main.pdf ii_qic.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Logic and Set Theory to HTML
run: ./pdf2htmlEX.AppImage ii/lst/build/main.pdf ii_lst.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Algebraic Geometry (Part II) to HTML
run: ./pdf2htmlEX.AppImage ii/alggeom/build/main.pdf ii_alggeom.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Number Fields to HTML
run: ./pdf2htmlEX.AppImage ii/nf/build/main.pdf ii_nf.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Commutative Algebra to HTML
run: ./pdf2htmlEX.AppImage iii/commalg/build/main.pdf iii_commalg.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Algebraic Geometry (Part III) to HTML
run: ./pdf2htmlEX.AppImage iii/alggeom/build/main.pdf iii_alggeom.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Model Theory and Non-Classical Logic to HTML
run: ./pdf2htmlEX.AppImage iii/mtncl/build/main.pdf iii_mtncl.html --data-dir pdf2htmlEX --zoom 3
- name: Convert Category Theory to HTML
run: ./pdf2htmlEX.AppImage iii/cat/build/main.pdf iii_cat.html --data-dir pdf2htmlEX --zoom 3
- name: Convert IA book to HTML
run: ./pdf2htmlEX.AppImage ia/book/build/main.pdf ia_book.html --data-dir pdf2htmlEX --zoom 3
- name: Convert IB book to HTML
run: ./pdf2htmlEX.AppImage ib/book/build/main.pdf ib_book.html --data-dir pdf2htmlEX --zoom 3
- name: Convert II book to HTML
run: ./pdf2htmlEX.AppImage ii/book/build/main.pdf ii_book.html --data-dir pdf2htmlEX --zoom 3
- name: Convert III book to HTML
run: ./pdf2htmlEX.AppImage iii/book/build/main.pdf iii_book.html --data-dir pdf2htmlEX --zoom 3
#- name: Optimise PDFs
# run: go run . optimise
- name: Upload PDFs
uses: burnett01/[email protected]
with:
switches: -avzr --delete --prune-empty-dirs --include="*/" --include="*.pdf" --include="*.html" --exclude="*"
path: "."
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: thirdsgames.co.uk
remote_user: github
remote_key: ${{ secrets.DEPLOY_KEY }}