File tree Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ on: [push, pull_request]
4
4
5
5
jobs :
6
6
pre-commit :
7
- runs-on : ubuntu-latest
7
+ runs-on : ubuntu-20.04
8
8
steps :
9
9
- uses : actions/checkout@v2
10
10
- uses : actions/setup-python@v2
21
21
sudo apt update
22
22
sudo apt install \
23
23
fontconfig \
24
+ imagemagick \
24
25
libgeos++-dev \
25
26
libproj-dev \
26
27
poppler-utils
40
41
texlive-xetex
41
42
- name : Build artifacts
42
43
run : |
43
- rm *.pdf
44
+ # adjust the ImageMagick policies to convert PDF to PNG
45
+ # remove all policies restricting Ghostscript ability to process files
46
+ # https://stackoverflow.com/q/52998331
47
+ # https://stackoverflow.com/a/59193253
48
+ sudo sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
49
+ #
44
50
make -C fonts/
45
51
cp -r fonts/ /usr/share/fonts/
46
52
fc-cache
59
65
path : |
60
66
cheatsheets.pdf
61
67
handout-*.pdf
68
+ - name : Publish cheatsheets and handouts
69
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
70
+ uses : peaceiris/actions-gh-pages@v3
71
+ with :
72
+ github_token : ${{ secrets.GITHUB_TOKEN }}
73
+ publish_dir : ./build/
74
+ force_orphan : true
Original file line number Diff line number Diff line change
1
+ # TeX auxiliary files
2
+ # ----------------------------------
1
3
* .aux
2
4
* .log
3
5
* .out
4
6
* .upa
7
+
8
+ # generated figures
9
+ # ----------------------------------
5
10
figures /* .pdf
6
11
fonts /** /* . [ot ]tf
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ default: all
5
5
6
6
.PHONY : all
7
7
all : logos figures cheatsheets handouts
8
+ mkdir -p ./build/
9
+ cp cheatsheets* .p* ./build/
10
+ cp handout-* .p* ./build/
8
11
9
12
.PHONY : logos
10
13
logos :
@@ -22,23 +25,31 @@ figures:
22
25
.PHONY : cheatsheets
23
26
cheatsheets :
24
27
xelatex cheatsheets.tex
28
+ convert -density 150 cheatsheets.pdf -scene 1 cheatsheets.png
25
29
26
30
.PHONY : handouts
27
31
handouts :
28
32
xelatex handout-beginner.tex
29
33
xelatex handout-intermediate.tex
30
34
xelatex handout-tips.tex
35
+ convert -density 150 handout-tips.pdf handout-tips.png
36
+ convert -density 150 handout-beginner.pdf handout-beginner.png
37
+ convert -density 150 handout-intermediate.pdf handout-intermediate.png
31
38
32
39
.PHONY : fonts
33
40
fonts :
34
41
make -C fonts/
35
42
36
43
.PHONY : clean
37
44
clean : $(SRC )
45
+ latexmk -c $^
46
+ - rm -rf ./build/
47
+
48
+ .PHONY : clean-all
49
+ clean-all : clean
38
50
- rm ./logos/mpl-logo2.pdf
39
51
git clean -f -X ./figures/
40
52
git clean -f ./scripts/* .pdf
41
- latexmk -c $^
42
53
43
54
.PHONY : requirements
44
55
requirements :
You can’t perform that action at this time.
0 commit comments