Skip to content

build: HTML/PDF/EPUB pipeline with GH Pages deploy#1

Merged
tamnd merged 2 commits into
mainfrom
build/website
Apr 19, 2026
Merged

build: HTML/PDF/EPUB pipeline with GH Pages deploy#1
tamnd merged 2 commits into
mainfrom
build/website

Conversation

@tamnd
Copy link
Copy Markdown
Owner

@tamnd tamnd commented Apr 19, 2026

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 upstream src/. 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 in src_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 ship fonts-libertinus in stable) + ImageMagick PDF policy loosened for EPUB rasterization.
  • scripts/build_vi.sh — builds from src_vi/ via bgbspd, stages docs/html/, docs/pdf/, docs/epub/, and a source zip. PACKAGE=bgc default.
  • scripts/build_vi_docker.sh — podman/docker auto-detect wrapper with Linux SELinux :Z mount flag.
  • scripts/render_index.sh — Vietnamese landing page docs/index.html with download links.
  • scripts/release.sh — local tag helper; parses src/Makefile VERSION_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 on v*-vi.*; builds via the same image; packages 8 PDFs + epub + 2 HTML zips + source zip + site tarball; softprops/action-gh-release@v3.
  • UPSTREAM.md — pins beejjorgensen/bgc@f6edbbb, v0.10.5 (April 18, 2026).
  • src_vi/ — 41 chapters + misc + unicodecheat copied verbatim from src/ so the pipeline has content to build. These get replaced in subsequent PRs.
  • README.md + README.en.md — bilingual landing pages.
  • All seven GitHub Actions at Node 24 majors (checkout@v6, upload-artifact@v7, upload-pages-artifact@v5, deploy-pages@v5, setup-buildx-action@v4, build-push-action@v7, action-gh-release@v3). No deprecation warnings.

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

  • CI build goes green on this PR (cold cache, ~13 min expected).
  • Docs artifact bgc-vi-docs contains html/, pdf/, epub/, source/, index.html.
  • After merge, main-branch build populates gha cache and deploy job publishes Pages.
  • https://tamnd.github.io/bgc-vi/ serves the landing page with working links to HTML/EPUB/PDF.
  • Cut v0.10.5-vi.0 via ./scripts/release.sh --tag v0.10.5-vi.0 --push once Pages is live, to smoke-test the release workflow end-to-end.

tamnd added 2 commits April 19, 2026 20:42
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.
@tamnd tamnd merged commit effb26e into main Apr 19, 2026
2 checks passed
@tamnd tamnd deleted the build/website branch April 19, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant