Skip to content

Instantly share code, notes, and snippets.

@NSEcho
Created February 24, 2023 16:34
Show Gist options
  • Save NSEcho/fad5933b77b76009ae00089c7c725ed5 to your computer and use it in GitHub Desktop.
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
# .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
@NSEcho
Copy link
Author

NSEcho commented Feb 24, 2023

From input.md this will generate output.pdf and upload it as output.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment