Skip to content

Commit

Permalink
Merge pull request #3 from lbrealdev/pandoc-workflow
Browse files Browse the repository at this point in the history
Improve pandoc workflow and dependencies
  • Loading branch information
lbrealdev authored Jun 18, 2024
2 parents 01280dc + 97fd20f commit 8b6ddf6
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/md-to-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ on:
required: true
type: string
upload-artifact:
description: upload or not
description: upload artifact
required: false
type: boolean

defaults:
run:
shell: sh

jobs:
md-to-pdf:
Expand All @@ -26,23 +30,26 @@ jobs:

- name: Setup pypandoc
run: |
apk add python3 texmf-dist texlive
python3 --version
apk add python3 texlive
python3 -m pip install pypandoc
- name: Python converter
run: |
python3 converter.py ${{ inputs.markdown-source-dir }}
#- name: Run pandoc
# run: |
# pandoc README.md -o README.pdf
- name: Run pandoc
run: |
pandoc README.md --from markdown --to html -o README.html
pandoc README.md --from markdown --to pdf -o README.pdf --pdf-engine=pdflatex
- name: Upload artifacts
if: inputs.upload-artifact
uses: actions/upload-artifact@v4
with:
name: pdf
path: test/_output

name: pandoc-artifact
path: |
README.html
README.pdf
test/_output/
retention-days: 3

0 comments on commit 8b6ddf6

Please sign in to comment.