pages/.github/workflows/render-cv.yml
George c39ef4a693
Rendercv missing commits (#3475)
Signed-off-by: George Araújo <george.gcac@gmail.com>
2026-01-23 12:45:27 -03:00

59 lines
1.8 KiB
YAML

name: Render a CV
on:
push:
branches:
- main
- master
paths:
- "_data/cv.yml"
- "assets/rendercv/design.yaml"
- "assets/rendercv/locale.yaml"
- "assets/rendercv/settings.yaml"
workflow_call:
workflow_dispatch:
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: |
cv_file=$(find _data -maxdepth 1 -type f \( -name "cv.yaml" -o -name "cv.yml" \))
if [ -z "$cv_file" ]; then
echo "No cv.yml file found!"
exit 1
fi
rendercv_dir=$(find assets -maxdepth 1 -type d -name "rendercv")
if [ -z "$rendercv_dir" ]; then
echo "No RenderCV config directory found!"
exit 1
fi
settings=$(find $rendercv_dir -maxdepth 1 -type f \( -name "settings.yaml" -o -name "settings.yml" \))
if [ -z "$settings" ]; then
echo "Missing RenderCV config file!"
exit 1
fi
rendercv render $cv_file --settings $settings
rm assets/rendercv/rendercv_output/*.typ
- name: Upload rendercv_output as an artifact
uses: actions/upload-artifact@v4
with:
name: RenderCV Output
path: assets/rendercv/rendercv_output
- name: Push the changes
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 "chore: render the latest CV"
git push