Created
February 24, 2023 16:34
-
-
Save NSEcho/fad5933b77b76009ae00089c7c725ed5 to your computer and use it in GitHub Desktop.
Sample github workflow to generate pdf from md on every push, the result is in artifacts
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
# .github/workflows/generate.yml | |
name: generate pdf | |
on: [push] | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra | |
- run: pip install weasyprint | |
- run: pandoc --pdf-engine=weasyprint -o output.pdf input.md | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: output.pdf | |
path: output.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From
input.md
this will generateoutput.pdf
and upload it asoutput.pdf