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]
44
55jobs :
66 pre-commit :
7- runs-on : ubuntu-latest
7+ runs-on : ubuntu-20.04
88 steps :
99 - uses : actions/checkout@v2
1010 - uses : actions/setup-python@v2
2121 sudo apt update
2222 sudo apt install \
2323 fontconfig \
24+ imagemagick \
2425 libgeos++-dev \
2526 libproj-dev \
2627 poppler-utils
4041 texlive-xetex
4142 - name : Build artifacts
4243 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+ #
4450 make -C fonts/
4551 cp -r fonts/ /usr/share/fonts/
4652 fc-cache
5965 path : |
6066 cheatsheets.pdf
6167 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+ # ----------------------------------
13* .aux
24* .log
35* .out
46* .upa
7+
8+ # generated figures
9+ # ----------------------------------
510figures /* .pdf
611fonts /** /* . [ot ]tf
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ default: all
55
66.PHONY : all
77all : logos figures cheatsheets handouts
8+ mkdir -p ./build/
9+ cp cheatsheets* .p* ./build/
10+ cp handout-* .p* ./build/
811
912.PHONY : logos
1013logos :
@@ -22,23 +25,31 @@ figures:
2225.PHONY : cheatsheets
2326cheatsheets :
2427 xelatex cheatsheets.tex
28+ convert -density 150 cheatsheets.pdf -scene 1 cheatsheets.png
2529
2630.PHONY : handouts
2731handouts :
2832 xelatex handout-beginner.tex
2933 xelatex handout-intermediate.tex
3034 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
3138
3239.PHONY : fonts
3340fonts :
3441 make -C fonts/
3542
3643.PHONY : clean
3744clean : $(SRC )
45+ latexmk -c $^
46+ - rm -rf ./build/
47+
48+ .PHONY : clean-all
49+ clean-all : clean
3850 - rm ./logos/mpl-logo2.pdf
3951 git clean -f -X ./figures/
4052 git clean -f ./scripts/* .pdf
41- latexmk -c $^
4253
4354.PHONY : requirements
4455requirements :
You can’t perform that action at this time.
0 commit comments