build: HTML/PDF/EPUB pipeline with GH Pages deploy#12
Merged
Conversation
- src_vi/Makefile wraps bgbspd source.make with Vietnamese title/author - Dockerfile.vi installs pandoc + texlive-xetex + Libertinus fonts - scripts/build_vi.sh produces HTML (single/wide/split), zips, EPUB, 8 PDFs, source zip into docs/ - scripts/build_vi_docker.sh wraps the above for Podman or Docker - .github/workflows/deploy.yml builds and deploys to GitHub Pages via Actions - bgbspd vendored as submodule for reproducible builds - cs.svg labels translated (Client/Server/request/response/Network)
- Dockerfile.vi: debian:trixie-slim (current stable), ImageMagick 7 native so drop the `magick -> convert` shim; keep the Libertinus TeX Live font workaround since fonts-libertinus is only in sid. - build-image.yml: new workflow that builds Dockerfile.vi and pushes to ghcr.io/tamnd/bgnet-vi-build:latest on Dockerfile/bgbspd changes, with gha build cache. PRs build but don't push. - deploy.yml: switch to the prebuilt GHCR image as the job container so each run skips the ~5 min apt-get texlive-full install and jumps straight to the build. Bump actions/checkout and upload-pages-artifact. - build_vi.sh: parallelise `make all` with -j (honours BGBS_THREADS env).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the full build pipeline so the translated guide renders as HTML, ZIP, EPUB, and PDFs and deploys to GitHub Pages at https://tamnd.github.io/bgnet-vi/.
bgbspdvendored as a git submodule so the upstream pandoc/xelatex toolchain is reproducible.src_vi/Makefilemirrorssrc/Makefilewith Vietnamese title and author metadata, and includesbgbspd/source.make.Dockerfile.vibuilds adebian:trixie-slimimage with pandoc,texlive-full, Libertinus fonts (copied out of TeX Live and registered with fontconfig sincefonts-libertinusis only in sid), ImageMagick 7 (nativemagick), librsvg, and friends.scripts/build_vi.shruns inside the container: cleanssrc_vi/, parallelisesmake allwith-j, builds HTML (single + wide), split directories, 8 letter/A4 PDFs, EPUB, zips the split HTML, zips the C source examples, and stages everything intodocs/with a landing page.scripts/build_vi_docker.shwraps the above for Podman or Docker (auto-detects; override withCONTAINER_BIN=)..github/workflows/deploy.ymlbuilds the image withdocker/build-push-action@v6+ GitHub Actions cache (cache-from/to: gha), runs the build inside it, uploads a Pages artifact, and deploys viaactions/deploy-pages@v4. First run ~13 min (texlive-full download); subsequent runs ~1-2 min thanks to buildx cache. Pages source switched toworkflowbuild type.cs.svglabels translated (Client/Server/request/response/The Network).docs/is generated output and gitignored.Verified in CI (run
24629369307)docs/index.htmllanding pagedocs/html/— single, wide, split, split-wide, plusbgnet.zip/bgnet-wide.zipdocs/epub/bgnet.epub(135 KB)docs/pdf/bgnet_{usl,a4}_{c,bw}_{1,2}.pdf— all eight variants, 500–650 KBdocs/source/bgnet_source.zip— C examplesBuild step timing: container image 717s, guide build 46s, upload 1s.
Test plan
/lists HTML, wide, split, EPUB, and all 8 PDFsbgnet.zipandbgnet-wide.zipcontain the split chaptersbgnet.epubopens in a reader