Skip to content

Commit 3438804

Browse files
committed
gh actions and docs
1 parent 5f8dd96 commit 3438804

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.github/workflows/generate_cv.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Generate CV
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'src/cv_data.yaml'
9+
- 'src/cv_template.md.j2'
10+
- 'src/build_cv.py'
11+
- 'generate_pdf.sh'
12+
- '.github/workflows/generate_cv.yml'
13+
workflow_dispatch:
14+
15+
jobs:
16+
build_cv:
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
contents: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.10'
30+
31+
- name: Install Python dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install pyyaml jinja2
35+
36+
- name: Install Pandoc
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra
40+
41+
- name: Generate Markdown CVs and PDFs
42+
run: |
43+
chmod +x ./generate_pdf.sh
44+
./generate_pdf.sh
45+
46+
- name: Commit and Push changes
47+
uses: stefanzweifel/git-auto-commit-action@v5
48+
with:
49+
commit_message: "Automated CV generation: update Markdown and PDFs"
50+
file_pattern: "src/*.md src/english/*.md output/*.pdf"

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,15 @@ To generate both the Markdown updates and compile the new PDFs, simply execute t
5454
This command will:
5555
1. Run `build_cv.py` to rewrite the `.md` files based on the latest `cv_data.yaml`.
5656
2. Execute Pandoc to convert the newly built Markdown files into high-quality PDFs placed in the `output/` directory.
57+
58+
## Automated CI/CD (GitHub Actions)
59+
60+
This repository includes a GitHub Actions workflow (`.github/workflows/generate_cv.yml`) that completely automates CV generation.
61+
62+
Whenever a push is made to the `main` branch containing changes to `src/cv_data.yaml` (or the generation scripts), GitHub Actions will automatically:
63+
1. Setup a Python environment and install the required dependencies (`pyyaml`, `jinja2`).
64+
2. Install Pandoc and LaTeX essentials.
65+
3. Execute `./generate_pdf.sh` to build fresh Markdown files and PDFs.
66+
4. Auto-commit and push the newly generated files back to the repository.
67+
68+
You simply edit the data, push your commit, and let GitHub handle the rest!

0 commit comments

Comments
 (0)