Switch to another approach of generation PDF from MD file #28
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 | |
# This workflow is triggered on pushes to the `master` branch of repository. | |
on: | |
push: | |
branches: | |
- master | |
# Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory | |
paths: | |
- 'CV/**.md' | |
- '.github/workflows/convert-md-to-pdf.yml' | |
workflow_dispatch: | |
branches: [ master ] | |
jobs: | |
converttopdf: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Grant execute permission for generate-pdf.sh | |
run: chmod +x generate-pdf.sh | |
- name: Generate PDF from MD | |
run: CV/generate-pdf.sh | |
- 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 |