Markdown to PDF
Creates PDF and HTML files from Markdown using the GitHub (or custom) theme.
input_dir
input. This is still accepted as input for backwards compatibility, but passing a directory as input_path
now carries out the same functionality.images/about/file.png
and images/something-else/file.png
you would pass the value images
.<img src="./images/something-else/file.">
you would pass ./images
as this is replaced by https://localhost:3000
during the build process.true
. After all, this is the intended behaviour).with: input_path: value
with: images_dir: value
with: output_dir: value
with: image_import: value
with: build_html: value
with: build_pdf: value
with: theme: value
with: extend_default_theme: value
with: highlight_theme: value
with: template: value
with: table_of_contents: value
# .github/workflows/convert-to-pdf.yml name: Docs to PDF # This workflow is triggered on pushes to the repository. on: push: branches: - main # Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory paths: - 'docs/**.md' - 'docs/images/**' jobs: converttopdf: name: Build PDF runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: baileyjm02/markdown-to-pdf@v1 with: input_dir: docs output_dir: pdfs images_dir: docs/images # for example <img src="./images/file-name.png"> image_import: ./images # Default is true, can set to false to only get PDF files build_html: false - uses: actions/upload-artifact@v1 with: name: docs path: pdfs