Github Action to convert local and remote HTML files to PDF using puppeteer.
Supports puppeteer PDFOptions
to configure the PDF generation.
Use it as a step in your workflow file:
jobs:
html2pdf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ntdesmond/html2pdf-action@v1
with:
path: ./file.html
output: ./file.pdf
options: |
{"format": "A4"}
- uses: actions/upload-artifact@v3
with:
path: ./file.pdf
To fetch files served over HTTP, pass the URL as path, e.g. http://127.0.0.1:8080/file.html
.