Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit 190f5ec

Browse files
authored
Create GitHub Action for building course-notes.pdf (#13)
1 parent dbadc7c commit 190f5ec

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
container: registry.gitlab.com/islandoftex/images/texlive:TL2024-2025-01-05-medium@sha256:3c51378a5396fefbeb722c347450660e9a9b5539ffbfcf5da13df7c6a22cb0e3
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Run a one-line script
18+
shell: bash
19+
run: . ./ci.sh
20+
21+
- uses: actions/upload-artifact@v4.5.0
22+
with:
23+
path: course-notes.pdf
24+
if-no-files-found: error

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ course-notes.pdf
77
incrementAges.png
88
linked_list_sum_recursive.png
99
language.md
10+
search_tree.png

ci.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pushd ..
2+
3+
git clone https://github.com/btj/jlearner
4+
export JLEARNERPATH=`pwd`/jlearner
5+
6+
curl --remote-name https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
7+
texlua install-getnonfreefonts
8+
export PATH=/usr/local/texlive/2024/bin/x86_64-linux:$PATH
9+
getnonfreefonts --sys luximono
10+
11+
apt-get update
12+
apt-get install -y pandoc
13+
14+
popd
15+
16+
. ./make-pdf.sh

make-pdf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pandoc -o course-notes.html -f gfm \
2424
multi_object_doc_instr.md \
2525
iterators.md \
2626
generics.md
27-
pandoc --wrap=none -V documentclass=book --toc --template=latex.template --listings -o course-notes.tex course-notes.html
27+
pandoc --wrap=none -V documentclass=book -V papersize:a4 --toc --template=latex.template --listings -o course-notes.tex course-notes.html
2828
if [ `uname -s` = Darwin ]; then
2929
SED_IN_PLACE=(-i '')
3030
else

0 commit comments

Comments
 (0)