Merge pull request #5 from stateless-solutions/jessicadaugherty-patch-5 #19
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: Generate PDF | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'litepaper.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Pandoc | |
run: sudo apt-get install -y pandoc npm texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra | |
- name: Install Mermaid Filter | |
run: npm install --global mermaid-filter | |
- name: Convert Markdown to PDF | |
run: pandoc latex-includes.yaml litepaper.md -F mermaid-filter --variable urlcolor=cyan -o litepaper.pdf | |
- name: Mirror the README | |
run: cp litepaper.md README.md | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
file_pattern: "README.md *.pdf" | |
commit_message: Render PDF | |