Skip to content

Commit 5bb026c

Browse files
ci: build the booklet in the embedded-devcontainer-documentation container (#44)
Run the booklet job in the pinned documentation container image, which already contains Pandoc and the XeLaTeX tool chain, instead of installing them on the runner for every build. Claude-Session: https://claude.ai/code/session_014WUWh7MxCGbjgikbK3RwEv Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6161423 commit 5bb026c

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

‎.github/workflows/build-booklet.yml‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,19 @@ concurrency:
3030
jobs:
3131
build:
3232
runs-on: ubuntu-latest
33+
# Pandoc and the XeLaTeX tool chain come with the container image.
34+
container: gabrielfrasantos/embedded-devcontainer-documentation:v7.4.0@sha256:0537b16931e116f98fd62e0bad454af5bcd102ec6501ccdef2b270aa83fd281e
3335
steps:
3436
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3537
with:
3638
fetch-depth: 0
3739

38-
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
39-
with:
40-
python-version: "3.12"
41-
42-
- name: Install Pandoc and TeX toolchain
43-
run: |
44-
sudo apt-get update
45-
sudo apt-get install -y --no-install-recommends \
46-
pandoc texlive-xetex texlive-latex-extra texlive-fonts-recommended lmodern librsvg2-bin
40+
# The checkout belongs to the runner user, while the container runs as root.
41+
- name: Mark the workspace as a safe Git directory
42+
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
4743

4844
- name: Build booklet (PDF + HTML)
49-
run: python scripts/build-booklet.py --format all
45+
run: python3 scripts/build-booklet.py --format all
5046

5147
- name: Upload PDF artifact
5248
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The entire documentation set is also published as a single book — read it onli
5555
PDF from the [Releases page](https://github.com/embedded-pro/robotics-toolbox-cpp/releases/latest). Both are generated automatically from `doc/`
5656
(cover, Summary/table of contents, one chapter per category, consolidated references, back cover).
5757

58-
Build it locally with [Pandoc](https://pandoc.org) + XeLaTeX installed:
58+
Build it locally with [Pandoc](https://pandoc.org) + XeLaTeX installed, or in the [`embedded-devcontainer-documentation`](https://hub.docker.com/r/gabrielfrasantos/embedded-devcontainer-documentation) container image that CI uses:
5959

6060
```bash
6161
python scripts/build-booklet.py --format all # writes build/booklet/{RoboticsToolbox.pdf,index.html}

0 commit comments

Comments
 (0)