Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32b604c

Browse files
committed
add GitHub Pages site with the latest cheatsheets and handouts
1 parent 9fc11de commit 32b604c

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

.github/workflows/main.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
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
@@ -21,6 +21,7 @@ jobs:
2121
sudo apt update
2222
sudo apt install \
2323
fontconfig \
24+
imagemagick \
2425
libgeos++-dev \
2526
libproj-dev \
2627
poppler-utils
@@ -40,7 +41,7 @@ jobs:
4041
texlive-xetex
4142
- name: Build artifacts
4243
run: |
43-
rm *.pdf
44+
sudo sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
4445
make -C fonts/
4546
cp -r fonts/ /usr/share/fonts/
4647
fc-cache
@@ -59,3 +60,10 @@ jobs:
5960
path: |
6061
cheatsheets.pdf
6162
handout-*.pdf
63+
- name: Publish cheatsheets and handouts
64+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
65+
uses: peaceiris/actions-gh-pages@v3
66+
with:
67+
github_token: ${{ secrets.GITHUB_TOKEN }}
68+
publish_dir: ./build/
69+
force_orphan: true

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
# TeX auxiliary files
2+
# ----------------------------------
13
*.aux
24
*.log
35
*.out
46
*.upa
7+
8+
# generated figures
9+
# ----------------------------------
510
figures/*.pdf
611
fonts/**/*.[ot]tf

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ default: all
55

66
.PHONY: all
77
all: logos figures cheatsheets handouts
8+
mkdir -p ./build/
9+
cp cheatsheets*.p* ./build/
10+
cp handout-*.p* ./build/
811

912
.PHONY: logos
1013
logos:
@@ -22,23 +25,31 @@ figures:
2225
.PHONY: cheatsheets
2326
cheatsheets:
2427
xelatex cheatsheets.tex
28+
convert -density 150 cheatsheets.pdf -scene 1 cheatsheets.png
2529

2630
.PHONY: handouts
2731
handouts:
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
3340
fonts:
3441
make -C fonts/
3542

3643
.PHONY: clean
3744
clean: $(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
4455
requirements:

0 commit comments

Comments
 (0)