File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,19 +85,35 @@ jobs:
8585 nix_path : nixpkgs=channel:nixos-23.11
8686 github_access_token : ${{ secrets.GITHUB_TOKEN }}
8787
88- - name : Build combined Anki deck with Nix
88+ - name : Make Hasklug font visible to tectonic
89+ run : |
90+ nix develop --command true
91+ mkdir -p ~/Library/Fonts
92+ for dir in /nix/store/*-nerd-fonts-hasklug-*/share/fonts; do
93+ [ -d "$dir" ] || continue
94+ find "$dir" -type f \( -name "*.otf" -o -name "*.ttf" \) \
95+ -exec cp -n {} ~/Library/Fonts/ \;
96+ done
97+ echo "Installed fonts:"
98+ ls ~/Library/Fonts/ | grep -i hasklug | head
99+
100+ - name : Build combined Anki deck and PDF with Nix
89101 run : |
90102 nix develop --command bash -c 'make build-combined'
91103
92- - name : Upload combined deck to workflow run
104+ - name : Upload combined artifacts to workflow run
93105 uses : actions/upload-artifact@v7
94106 with :
95107 name : cards-combined
96- path : cards-combined.apkg
108+ path : |
109+ cards-combined.apkg
110+ cards-combined.pdf
97111 if-no-files-found : error
98112
99113 - name : Release
100114 if : startsWith(github.ref, 'refs/tags/v')
101115 uses : softprops/action-gh-release@v2
102116 with :
103- files : cards-combined.apkg
117+ files : |
118+ cards-combined.apkg
119+ cards-combined.pdf
Original file line number Diff line number Diff line change 11.direnv
22cards-combined.md
33cards-combined.apkg
4+ cards-combined.pdf
Original file line number Diff line number Diff line change @@ -26,8 +26,20 @@ cards-combined.apkg: cards-combined.md
2626 anki-panky $<
2727
2828
29+ cards-combined.pdf : cards-combined.md
30+ pandoc \
31+ --pdf-engine tectonic \
32+ --variable " geometry:papersize={130mm,130mm}" \
33+ --variable " fontsize: 10pt" \
34+ --variable " monofont:Hasklug Nerd Font Mono" \
35+ --variable " monofontoptions:Scale=0.7, FontFace={weight=700}" \
36+ --to beamer \
37+ --output $@ \
38+ $<
39+
40+
2941.PHONY : build-combined
30- build-combined : cards-combined.apkg
42+ build-combined : cards-combined.apkg cards-combined.pdf
3143
3244
3345.PHONY : test
4052
4153.PHONY : clean
4254clean :
43- rm -f cards-combined.md cards-combined.apkg
55+ rm -f cards-combined.md cards-combined.apkg cards-combined.pdf
4456 cd rust && make clean
4557 cd godot && make clean
4658 cd sqlite && make clean
You can’t perform that action at this time.
0 commit comments