-
Notifications
You must be signed in to change notification settings - Fork 78
40 lines (38 loc) · 1.42 KB
/
md-to-pdf.yml
File metadata and controls
40 lines (38 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 update -qq
sudo apt-get install -y pandoc
- name: Running Pandoc
run: |
pandoc
--output=output/aseprite-docs.pdf "overview.md" ${{ steps.files_list.outputs.files }}
--pdf-engine=lualatex
-f markdown_github
--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