necto / pandoc

GitHub action to run pandoc

Home Page:https://github.com/maxheld83/pandoc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Action to Convert Documents via Pandoc

This action lets you use pandoc, the swiss army knife of document conversion.

It is based on the pandoc/latex docker image and thus ships with LaTeX, so you can also convert right through to PDF.

The action currently uses pandoc 2.6 and will be upgrade periodically. If you would like to see an upgrade, please file an issue.

Inputs

None.

Outputs

None.

Secrets

None.

Environment Variables

None.

Example Usage

The string passed to pandoc-args gets appended to the pandoc command. The whole command is interpreted by the sh shell, so you can use globs (e.g. source/*.md) to specify your inputs.

name: Document Conversion

on: [push]

jobs:
  convert_to_pdf:
    name: Produce the PDF with Pandoc
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v1
      - run: mkdir output
      - uses: necto/pandoc@master
        with:
          pandoc-args: "--pdf-engine=xelatex --output=output/README.pdf README.md"
      - uses: actions/upload-artifact@master
        with:
          name: output
          path: output

About

GitHub action to run pandoc

https://github.com/maxheld83/pandoc

License:GNU General Public License v2.0