gh actions and docs #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate CV | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/cv_data.yaml' | |
| - 'src/cv_template.md.j2' | |
| - 'src/build_cv.py' | |
| - 'generate_pdf.sh' | |
| - '.github/workflows/generate_cv.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build_cv: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyyaml jinja2 | |
| - name: Install Pandoc | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra | |
| - name: Generate Markdown CVs and PDFs | |
| run: | | |
| chmod +x ./generate_pdf.sh | |
| ./generate_pdf.sh | |
| - name: Commit and Push changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "Automated CV generation: update Markdown and PDFs" | |
| file_pattern: "src/*.md src/english/*.md output/*.pdf" |