Upgrade checkout v2->v4 in GH actions workflow #34
This file contains 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: MD to PDF | |
on: | |
push: | |
branches: [ master ] | |
# Paths can be used to only trigger actions when you have edited certain files | |
paths: | |
- 'CV/*.md' | |
- 'CV/*.css' | |
- '.github/workflows/convert-md-to-pdf.yml' | |
workflow_dispatch: | |
jobs: | |
convert-to-pdf: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate PDF from MD | |
run: curl -v --data-urlencode "markdown=$(cat CV/Andrei_Punko_CV_\(eng\).md)" -d "css=$(cat CV/style.css)" --output CV/pdf/Andrei_Punko_CV_\(eng\).pdf https://md-to-pdf.fly.dev | |
- name: Commit the PDF (if it changed) | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git config --global user.name 'Github workflow' | |
git config --global user.email 'nowhere@gmail.com' | |
git add -A | |
git commit -m "Autogenerated CV in PDF" | |
git push | |
fi |