Skip to content

CosmDandy/cv

Repository files navigation

CV-as-Code

Templated resume built with LaTeX, generated from YAML data via Jinja2, compiled and deployed automatically through GitHub Actions to GitHub Pages.

Live: cv.cosmdandy.dev

Architecture

graph LR
    A["cv-data.yaml<br/><i>(secret)</i>"] --> B["build.py<br/><i>(Jinja2)</i>"]
    B --> C["cv-{lang}.tex<br/><i>(generated)</i>"]
    C --> D["LaTeX"]
    D --> E["cv-{lang}.pdf<br/><i>(artifact)</i>"]
    E --> F["GitHub Pages<br/><b>cv.cosmdandy.dev</b>"]
    G["index.html"] --> F
Loading

How It Works

  1. CV content is stored in cv-data.yaml (private, not in git)
  2. build.py renders Jinja2 template with YAML data for each language (ru, en)
  3. LaTeX compiles generated .tex files to PDF
  4. GitHub Actions deploys PDFs + landing page to GitHub Pages
  5. Personal data is injected at build time from CV_DATA GitHub Secret (base64-encoded YAML)

Local Development

Prerequisites

Python 3.9+ with pip:

pip install -r requirements.txt

LaTeX (for PDF compilation):

# macOS (via Homebrew)
brew install --cask mactex-no-gui
# or minimal installation:
brew install basictex
sudo tlmgr update --self
sudo tlmgr install latexmk collection-fontsrecommended collection-langcyrillic \
  fontawesome raleway droidsans cmbright enumitem moresize

# Ubuntu/Debian
sudo apt install texlive-full
# or minimal:
sudo apt install texlive-base texlive-latex-extra texlive-fonts-extra \
  texlive-lang-cyrillic texlive-fonts-recommended latexmk

# Arch Linux
sudo pacman -S texlive

Build Steps

# 1. Create your data file from example
cp cv-data.example.yaml cv-data.yaml
# Edit cv-data.yaml with your real data

# 2. Generate .tex files only (no LaTeX needed)
make render

# 3. Generate .tex AND compile to PDF
make build

# 4. Build using example data (for testing)
make build-example

# 5. Open generated PDFs (macOS)
open output/cv-ru.pdf output/cv-en.pdf

# 6. Clean generated files
make clean

Manual Build (without Make)

# Generate .tex
python scripts/build.py --data cv-data.yaml --lang ru,en --output output/

# Compile to PDF
cd output
latexmk -pdf cv-ru.tex
latexmk -pdf cv-en.tex

Repository Structure

.devcontainer/              DevPod configuration
template/
  developercv.cls            LaTeX document class
  cv.tex.j2                  Jinja2 template (bilingual)
scripts/
  build.py                   YAML + Jinja2 → LaTeX generator
pages/
  index.html                 Landing page for GitHub Pages
.github/workflows/
  build-deploy.yml           CI/CD pipeline
cv-data.example.yaml         Example data (public)
cv-data.yaml                 Real data (gitignored, injected via secret)
Makefile                     Local build commands

Setup for Your Own CV

  1. Fork this repository
  2. Copy cv-data.example.yaml to cv-data.yaml and fill in your data
  3. Add CV_DATA secret to your GitHub repo:
    # macOS
    base64 < cv-data.yaml | pbcopy
    # Linux
    base64 -w 0 < cv-data.yaml | xclip -selection clipboard
    Then paste into GitHub → Settings → Secrets → Actions → New secret → CV_DATA
  4. Update CNAME with your domain (or delete it for username.github.io/cv)
  5. Enable GitHub Pages: Settings → Pages → Source: GitHub Actions
  6. Push to trigger build and deploy

Tech Stack

  • Template: LaTeX (developercv class)
  • Templating: Jinja2 with custom delimiters for LaTeX compatibility
  • Data: YAML (single source → two languages)
  • CI/CD: GitHub Actions
  • Hosting: GitHub Pages
  • Dev Environment: DevPod

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 
Generated from CosmDandy/template-devpod