Skip to content

feat: export each page as image for multi-page resume #32

feat: export each page as image for multi-page resume

feat: export each page as image for multi-page resume #32

Workflow file for this run

name: Resume Builder
on:
push:
branches:
- main
paths:
- "example.py"
- ".github/workflows/resume.yml"
- "src/resume/utils.py"
- "src/template/*.*"
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
generate-resume:
name: Generate Resume
if: github.repository == 'cybardev/resume'
runs-on: ubuntu-latest
outputs:
files_changed: ${{ steps.check_updates.outputs.changed }}
steps:
- name: Install dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: pandoc wkhtmltopdf poppler-utils
version: 1.0
- name: Checkout repository
uses: actions/checkout@v4
- name: Run resume generation script
run: |
export PYTHONPATH=$PYTHONPATH:$PWD/src/
python3 -m resume.builder example.py -o ./site/assets
- name: Check for resume changes
id: check_updates
run: |
FILE_CHANGED=$(git diff ./site/assets | grep md | head -n 1)
UPDATE=$(python3 -c "print(str('${FILE_CHANGED}'.endswith('.md')).lower())")
echo "Re-upload resume: ${UPDATE}"
echo "changed=${UPDATE}" >> "${GITHUB_OUTPUT}"
- name: Commit changes
if: steps.check_updates.outputs.changed == 'true'
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git commit -a -m "pipeline: update resume"
- name: Upload resume files
if: steps.check_updates.outputs.changed == 'true'
uses: ad-m/github-push-action@master
with:
branch: main
github_token: ${{ secrets.GITHUB_TOKEN }}
publish-site:
needs: generate-resume
if: needs.generate-resume.outputs.files_changed == 'true'
uses: ./.github/workflows/website.yml