Skip to content

Commit 05da248

Browse files
Merge pull request #1 from Yury-Zakharov/migrate-torender-cv
Migrate to render cv
2 parents 2c77a33 + 7fc2047 commit 05da248

10 files changed

Lines changed: 311 additions & 765 deletions

File tree

.envrc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1-
use nix
1+
require_pass() {
2+
if ! pass "$1" >/dev/null 2>&1; then
3+
echo "Missing secret: $1"
4+
return 1
5+
fi
6+
}
7+
8+
export_secret() {
9+
local path="$1"
10+
local var="$2"
11+
export "$var=$(pass "$path")"
12+
}
13+
14+
# require_pass user/llm/z-ai/api-key
15+
# require_pass user/llm/z-ai/base-url
16+
# require_pass dev/query-dsl/context7/api-key
17+
# require_pass user/pat/nuget/read
18+
19+
# export_secret user/llm/z-ai/api-key ZAI_API_KEY
20+
# export_secret user/llm/z-ai/base-url BASE_URL
21+
# export_secret dev/query-dsl/context7/api-key CONTEXT7_API_KEY
22+
# export_secret user/pat/nuget/read GITHUB_PAT
23+
24+
use flake . --impure

.github/workflows/render-cv.yml

Lines changed: 10 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,20 @@
1-
name: Render CV (HTML + PDF)
2-
3-
permissions:
4-
contents: write
1+
name: Render CV
52

63
on:
7-
workflow_dispatch:
84
push:
9-
branches: [master]
10-
paths:
11-
- resume.json
12-
- print.css
13-
pull_request:
14-
branches: [master]
15-
paths:
16-
- resume.json
17-
- print.css
5+
branches: [ master ]
6+
workflow_dispatch:
187

198
jobs:
209
render:
2110
runs-on: ubuntu-latest
22-
2311
steps:
24-
- name: Checkout repository
25-
uses: actions/checkout@v4
26-
with:
27-
fetch-depth: 0 # required to commit back
28-
29-
# =========================
30-
# Pipeline A — HTML (even)
31-
# =========================
32-
- name: Render HTML (even theme)
33-
run: |
34-
mkdir -p build resume-build
35-
cd resume-build
36-
37-
npm init -y >/dev/null
38-
npm install \
39-
resume-cli@3.0.8 \
40-
jsonresume-theme-even@0.9.0 \
41-
>/dev/null
42-
43-
npx resume export ../build/index.html \
44-
--resume ../resume.json \
45-
--theme even
12+
- uses: actions/checkout@v4
4613

47-
# =========================
48-
# Pipeline B — PDF (stackoverflow + print.css)
49-
# =========================
50-
- name: Render print HTML (stackoverflow theme)
51-
run: |
52-
cd resume-build
14+
- uses: nixbuild/nix-quick-install-action@v26
15+
- run: nix develop --command rendercv render cv.yaml --output-folder render-output -nopng
5316

54-
npm install \
55-
jsonresume-theme-stackoverflow \
56-
>/dev/null
57-
58-
npx resume export ../build/print.html \
59-
--resume ../resume.json \
60-
--theme stackoverflow
61-
62-
- name: Render PDF
63-
run: |
64-
docker run --rm \
65-
--user root \
66-
-v "$PWD:/work" \
67-
-w /work \
68-
docker.io/4teamwork/weasyprint \
69-
weasyprint \
70-
build/print.html \
71-
build/cv.pdf \
72-
--stylesheet print.css
73-
74-
# =========================
75-
# Commit artifacts back
76-
# =========================
77-
- name: Commit rendered artifacts
78-
if: github.event_name != 'pull_request'
79-
run: |
80-
git config user.name "cv-bot"
81-
git config user.email "cv-bot@users.noreply.github.com"
82-
83-
git add build/index.html build/cv.pdf
84-
85-
if git diff --cached --quiet; then
86-
echo "No changes to commit"
87-
exit 0
88-
fi
89-
90-
git commit -m "chore(cv): regenerate HTML and PDF"
91-
git push
17+
- uses: stefanzweifel/git-auto-commit-action@v5
18+
with:
19+
commit_message: "chore: update rendered CV (PDF/HTML/MD)"
20+
file_pattern: render-output/*

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@ resume-build/
44
resume-print/
55
.direnv
66
.direnv/
7+
.cache
8+
.cache/
9+
.config
10+
.config/
11+
.local
12+
.local/
13+
render-output/
14+
.DS_Store
15+
*.pyc
16+
__pycache__/

README.md

Lines changed: 19 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,25 @@
1-
# CV / Resume
1+
# Yury Zakharov – CV / Resume
22

3-
This repository contains my curriculum vitae maintained as a **JSON Resume** document and rendered automatically to **HTML** and **PDF**.
3+
Single source of truth for my professional CV.
44

5-
The JSON file is the single source of truth.
6-
All rendered artefacts are generated from it.
5+
## Technology stack
6+
- **Source**: `cv.yaml` (human-readable YAML, validated by RenderCV schema)
7+
- **Engine**: [RenderCV](https://rendercv.com) (Typst typesetting)
8+
- **Outputs** (auto-generated):
9+
- `render-output/Yury_Zakharov_CV.pdf` – printer-friendly, ATS-compliant
10+
- `render-output/Yury_Zakharov_CV.html` – semantic HTML
11+
- `render-output/Yury_Zakharov_CV.md` – ready for GitHub profile README
712

8-
## Structure
13+
## Workflow
14+
1. Edit only `cv.yaml`
15+
2. Push to `master` → GitHub Actions automatically re-renders everything
16+
3. Or render locally (NixOS):
17+
```bash
18+
nix develop --command rendercv render cv.yaml --output-folder render-output -nopng
919

10-
``` bash
11-
├── resume.json # Source of truth (JSON Resume format)
12-
├── build/
13-
│ ├── index.html # Web version (jsonresume-theme-even)
14-
│ └── cv.pdf # Print-friendly PDF (StackOverflow theme + print.css)
15-
├── print.css # Print-specific stylesheet for PDF generation
16-
├── cover-letter/
17-
│ ├── template.md # General cover letter template
18-
│ ├── email-template.md # General email template
19-
│ ├── template-finance.md # Finance / regulated systems variant
20-
│ └── README.md # Usage notes for cover letters
21-
└── .github/
22-
└── workflows/
23-
└── render.yml # Automated rendering pipeline
24-
```
20+
## GitHub Actions
2521

26-
## Design principles
22+
- Triggers automatically on every push to master
23+
- Can be run manually on any branch (workflow_dispatch)
2724

28-
- **Single source of truth**
29-
`resume.json` is authoritative. HTML and PDF are derived artefacts.
30-
31-
- **Separation of concerns**
32-
- Web presentation and print layout are handled separately
33-
- Print-specific styling lives in `print.css`
34-
35-
- **Minimalism and determinism**
36-
- No manual editing of generated files
37-
- Reproducible builds
38-
39-
- **ATS tolerance**
40-
- Schema-compliant JSON Resume format
41-
- Conservative structure and wording
42-
43-
## Rendering pipeline
44-
45-
Rendering is automated via **GitHub Actions** and runs on:
46-
47-
- manual trigger
48-
- push or merge to the `master` branch
49-
50-
The pipeline performs two independent renders:
51-
52-
1. **Web version**
53-
- Theme: `jsonresume-theme-even`
54-
- Output: `build/index.html`
55-
56-
2. **PDF version**
57-
- Theme: `jsonresume-theme-stackoverflow`
58-
- HTML rendered first
59-
- Converted to PDF using WeasyPrint and `print.css`
60-
- Output: `build/cv.pdf`
61-
62-
Both artefacts are committed back to the repository.
63-
64-
## Notes
65-
66-
- Generated files are committed intentionally for convenience.
67-
- Node and dependency warnings during rendering are tolerated if non-fatal.
68-
- Cover letters in this repository are **templates only**; application-specific letters are kept private.
69-
70-
---
25+
All rendered files are committed to render-output/ for easy download.

build/cv.pdf

-51.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)