build: HTML/PDF/EPUB pipeline with GH Pages deploy#1
Merged
Conversation
Mirrors the bgnet-vi build pipeline for bgc-vi. Dockerfile.vi wraps pandoc + texlive-full + the Libertinus font shimming so the bgbspd build system produces HTML, split HTML, EPUB, and eight PDF variants end-to-end. scripts/build_vi.sh stages everything into docs/ and render_index.sh writes a Vietnamese landing page with download links. src_vi/ starts as a verbatim copy of upstream src/ so the pipeline has real content to build and GitHub Pages can go live before any translation work begins. Subsequent PRs will replace chapters one at a time (see ROADMAP.md). - Dockerfile.vi: debian:trixie-slim, texlive-full, Libertinus font copy-out, ImageMagick PDF policy loosened - scripts/: build_vi.sh, build_vi_docker.sh (podman/docker auto-detect), render_index.sh, release.sh - .github/workflows/deploy.yml: buildx + gha cache, pages artifact, deploy-pages@v5 (all actions at Node 24 majors) - .github/workflows/release.yml: tag-triggered, v*-vi.* pattern, publishes 8 PDFs + epub + 2 HTML zips + source zip + site tarball - UPSTREAM.md: pins beejjorgensen/bgc@f6edbbb, v0.10.5 - README.md + README.en.md: bilingual landing pages
Both deploy and release workflows used to buildx the TeX Live image on every job, with gha cache smoothing over the worst of it. That cache is scoped per-repo, so fresh branches paid ~13 min to install texlive-full from scratch. Switch to pulling ghcr.io/tamnd/beej-vi-docker:latest, a shared image maintained in tamnd/beej-vi-docker. Cold pull is ~30 s, no gha cache bookkeeping, no Dockerfile.vi to keep in sync across translation repos.
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
Stands up the full build pipeline before any translation work begins. Copies the proven bgnet-vi playbook (Dockerfile.vi + bgbspd submodule + GHA deploy + tag-triggered release) and wires it to bgc. Everything is language-agnostic at the container layer; we just need
src_vi/to have buildable content, so I seeded it as a verbatim copy of upstreamsrc/. Once this merges, GitHub Pages will serve an English bgc site at https://tamnd.github.io/bgc-vi/ and the translation PRs that follow just replace files insrc_vi/one at a time.What's in the box
Dockerfile.vi— debian:trixie-slim + texlive-full + Libertinus font copy-out from TeX Live (Debian doesn't shipfonts-libertinusin stable) + ImageMagick PDF policy loosened for EPUB rasterization.scripts/build_vi.sh— builds fromsrc_vi/via bgbspd, stagesdocs/html/,docs/pdf/,docs/epub/, and a source zip.PACKAGE=bgcdefault.scripts/build_vi_docker.sh— podman/docker auto-detect wrapper with Linux SELinux:Zmount flag.scripts/render_index.sh— Vietnamese landing pagedocs/index.htmlwith download links.scripts/release.sh— local tag helper; parsessrc/MakefileVERSION_DATE, auto-bumps-vi.N, confirms, optionally pushes..github/workflows/deploy.yml— buildx + gha cache, upload-pages-artifact@v5, deploy-pages@v5. Triggers on push to main and on PRs (PRs build but don't deploy)..github/workflows/release.yml— tag-triggered onv*-vi.*; builds via the same image; packages 8 PDFs + epub + 2 HTML zips + source zip + site tarball; softprops/action-gh-release@v3.UPSTREAM.md— pinsbeejjorgensen/bgc@f6edbbb, v0.10.5 (April 18, 2026).src_vi/— 41 chapters + misc + unicodecheat copied verbatim fromsrc/so the pipeline has content to build. These get replaced in subsequent PRs.README.md+README.en.md— bilingual landing pages.Why English content first
The Dockerfile image takes ~13 min cold to build (texlive-full is ~5 GB) and I don't want the first translation PR to also double as the first CI debugging session. This PR proves the pipeline end-to-end using the upstream English text; the next PRs translate chapters with a known-good baseline to diff against.
Test plan
bgc-vi-docscontainshtml/,pdf/,epub/,source/,index.html.v0.10.5-vi.0via./scripts/release.sh --tag v0.10.5-vi.0 --pushonce Pages is live, to smoke-test the release workflow end-to-end.