Skip to content

Commit 7d73790

Browse files
authored
Initial commit
0 parents  commit 7d73790

31 files changed

+1283
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
7+
// Use 'onCreateCommand' to run commands after the container is created inside the container:
8+
"onCreateCommand": "pip install --user -r requirements.txt",
9+
// Configure tool-specific properties.
10+
"customizations": {
11+
"vscode": {
12+
"extensions": ["redhat.vscode-yaml", "mathematic.vscode-pdf"]
13+
}
14+
}
15+
}

.github/workflows/release.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release a CV
2+
3+
on:
4+
push:
5+
tags:
6+
- "*" # Any tag pushed to the repository
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
call_rendercv_workflow:
13+
name: RenderCV
14+
uses: ./.github/workflows/rendercv.yaml
15+
16+
build:
17+
needs: call_rendercv_workflow
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Download RenderCV Output
23+
uses: actions/download-artifact@v4
24+
with:
25+
name: RenderCV Output
26+
path: rendercv_output
27+
- name: Release
28+
uses: softprops/action-gh-release@v2
29+
with:
30+
files: |
31+
rendercv_output/*_CV.pdf
32+
rendercv_output/*_CV.tex
33+
generate_release_notes: true
34+
make_latest: true

.github/workflows/rendercv.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Render a CV
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_call: # to make the workflow triggerable from other workflows (release.yaml)
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
rendercv:
14+
name: RenderCV
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.12"
21+
- name: Install RenderCV
22+
run: |
23+
pip install -r requirements.txt
24+
- name: RenderCV
25+
run: |
26+
cd src
27+
cv_file=$(find . -maxdepth 1 -type f -name "*_CV.yaml" | head -n 1)
28+
if [ -z "$cv_file" ]; then
29+
echo "No RenderCV file found!"
30+
exit 1
31+
fi
32+
cd ..
33+
rendercv render src/$cv_file --pdf-path ${cv_file%.yaml}.pdf --markdown-path README.md --latex-path ${cv_file%.yaml}.tex
34+
- name: Upload rendercv_output as an artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: RenderCV Output
38+
path: rendercv_output
39+
- uses: dorny/paths-filter@v3
40+
id: changes
41+
with:
42+
base: HEAD
43+
filters: |
44+
cv:
45+
- '*_CV.tex'
46+
- 'README.md'
47+
- name: Push the changes
48+
if: steps.changes.outputs.cv == 'true'
49+
run: |
50+
git config --global user.name "${{ github.actor }}"
51+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
52+
git add -A
53+
git commit -m "render the latest CV"
54+
git push

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__pycache__/
2+
rendercv_output/

.vscode/launch.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Run RenderCV",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"module": "rendercv",
12+
"args": [
13+
"render",
14+
"src/John_Doe_CV.yaml",
15+
"--pdf-path",
16+
"John_Doe_CV.pdf",
17+
"--markdown-path",
18+
"README.md"
19+
]
20+
}
21+
]
22+
}

John_Doe_CV.pdf

316 KB
Binary file not shown.

0 commit comments

Comments
 (0)