LaTeX CV template with CI that builds cv.pdf and publishes site files (PDF, index.html, optional CNAME). GitHub Pages-ready by default, with an optional Cloudflare Worker to serve the built site at a custom domain.
Adapted with gratitude from Jitin Nair's autoCV repository.
Live demo: cv.matthewlew.info
- Features
- Requirements
- Quick start (GitHub Pages)
- Local build
- Cloudflare Worker deploy (optional)
- Repository layout
- Package scripts
- Custom domain
- Style file documentation
- Troubleshooting
- License and credits
- One-source CV: edit
cv.tex, styles incvstyle.sty, bibliographies in*.bib. - CI build with
latexmk/lualatex; artifacts includecv.pdf,index.html,CNAME(if present). - Ready for GitHub Pages; no
buildbranch or manual uploads required. - Optional Cloudflare Worker that serves the built site from
distwith security headers and TLS 1.2+ enforcement.
- LaTeX distribution with
lualatexandlatexmk(TeX Live or MiKTeX). Install packages listed intl_packages. - Node 18+ and
pnpm(ornpm) for the Cloudflare Worker tooling (wrangler, TypeScript).
- Edit
cv.tex(plus any.sty/.bibas needed). - Commit and push.
- GitHub Actions builds and uploads the site artifact.
- Visit
https://<username>.github.io/<repo>/after Pages deploys (or your custom domain).
Workflow permissions: In Settings → Actions → General, set Workflow permissions to Read and write so the deploy job can publish Pages.
From the repo root:
latexmk -pdflua -lualatex="lualatex --shell-escape %O %S" -interaction=nonstopmode -output-directory=. ./cv.texOutputs cv.pdf in the root.
The Worker serves static assets from dist via the ASSETS binding (see wrangler.jsonc).
pnpm install
pnpm dev # local preview with wrangler
pnpm build # TypeScript -> dist
pnpm deploy # publish to Cloudflare Workers- Routes and asset dir are configured in
wrangler.jsonc(example:cv.matthewlew.info). - Ensure
distcontains your built site files (e.g.,cv.pdf,index.html,CNAME).
cv.tex— main CV sourcecvstyle.sty,biblatex_science_mods.sty— style and bibliography config*.bib— bibliographies (e.g.,pubs_journal.bib,patents.bib)tl_packages— TeX Live packages for CI.github/workflows/build.yml— CI pipeline for PDF build + Pages artifactwrangler.jsonc,src/index.ts— Cloudflare Worker config and handler
pnpm build— compile TypeScript for the Worker (tsc).pnpm dev— local Worker dev server (wrangler dev).pnpm deploy— deploy Worker (wrangler deploy).pnpm generate-types— fetch Cloudflare Worker types.
The CV styling is implemented in two custom LaTeX packages:
cvstyle.sty— Main style package with CV entry commands, page layout, and bibliography configurationbiblatex_science_mods.sty— Customizations to the biblatex-science citation style
Both files follow LaTeX best practices for robustness and maintainability. See REFACTORING.md for:
- Detailed documentation of improvements and best practices applied
- API stability guidelines (public vs. internal commands)
- Troubleshooting guide for common issues
- Migration guide for custom style files
Key features:
- Namespace protection with
cv@prefix for internal commands - Version requirements for critical packages
- Comprehensive troubleshooting sections in comments
- Defensive programming patterns for robustness
- GitHub Pages: add
CNAMEat the repo root with your domain; CI copies it into the artifact. - Cloudflare Worker: update the
routessection inwrangler.jsoncto match your domain.
- CI build fails: check the failing step in the Actions logs; confirm
tl_packagesdependencies are available. - Site not published (Pages): confirm the deploy job succeeded and Pages shows a recent deployment; verify workflow permissions are set to Read/Write.
- Local LaTeX build fails: ensure
lualatexandlatexmkare onPATHand rerun thelatexmkcommand above. - Worker issues: verify
distexists andpnpm buildsucceeded; confirmwrangler.jsoncmatches your domain and asset directory.
- License: MIT (see
LICENSE). - Credits: Adapted from Jitin Nair's autoCV.