Skip to content

Workaround for pandoc bug #80

Workaround for pandoc bug

Workaround for pandoc bug #80

Workflow file for this run

name: Markdown to PDF with pandoc
on:
push:
branches: [ master ]
paths:
- '**.md'
workflow_dispatch:
jobs:
md-to-pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Build the Docker image
run: docker build -t esndoc . < Dockerfile
- name: Build the pdf
run: |
MDFILELIST=$(ls ${{ github.workspace }}/*.md)
IFS=$'\n'
for mdfile in ${MDFILELIST}
do
mdfilebase=$(basename ${mdfile})
docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc esndoc "${mdfilebase}" -o "pdf/${mdfilebase%.*}.pdf" --pdf-engine=xelatex --template=esn.latex
done
- name: Build the html files
run: |
MDFILELIST=$(ls ${{ github.workspace }}/*.md)
IFS=$'\n'
for mdfile in ${MDFILELIST}
do
mdfilebase=$(basename ${mdfile})
docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc esndoc "${mdfilebase}" -o "html/${mdfilebase%.*}.html"
done
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
default_author: github_actions