Skip to content

Fix CI: use pandoc directly instead of docker #24

Fix CI: use pandoc directly instead of docker

Fix CI: use pandoc directly instead of docker #24

Workflow file for this run

name: Markdown to PDF
on: [push, workflow_dispatch]
jobs:
convert_via_pandoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create file list
id: files_list
run: |
echo "files=$(printf '\"%s\" ' *.md | sed 's/ \"sidebar\.md\"/ /' | sed 's/ \"overview\.md\"/ /' && printf '\"%s\" ' extensions/*.md)" > $GITHUB_OUTPUT
mkdir output
- name: Installing Dependencies
run: |
sudo apt-get install -y pandoc texlive texlive-luatex fonts-dejavu luaotfload
- name: Running Pandoc
run: |
pandoc \
--output=output/aseprite-docs.pdf "overview.md" ${{ steps.files_list.outputs.files }} \
--pdf-engine=lualatex \
-f gfm \
--include-in-header ./.github/workflows/pdf/header.tex \
--include-before-body ./.github/workflows/pdf/title.tex \
--lua-filter ./.github/workflows/pdf/link-gifs.lua \
--file-scope \
--table-of-contents \
--number-sections \
-V mainfont="DejaVu Sans" \
-V mainfontoptions:"Extension=.ttf, UprightFont=*, BoldFont=*-Bold" \
-V documentclass=article \
-V colorlinks \
-V urlcolor=NavyBlue \
-V geometry:"top=2cm, bottom=1.5cm, left=2cm, right=2cm"
- uses: actions/upload-artifact@v4
with:
name: aseprite-docs
path: output/aseprite-docs.pdf