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