-
Notifications
You must be signed in to change notification settings - Fork 179
36 lines (30 loc) · 1.04 KB
/
main.yml
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
name: Generate PDF
on:
push:
branches: [ pdf ]
# paths:
# - 'doc/**' # Trigger when docs are updated
jobs:
convert_to_pdf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install pandoc and LaTeX
run: |
sudo apt-get update
sudo apt-get install -y pandoc texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- name: Merge Markdown files
run: |
find doc -type f -name "readme.md" | sort | xargs -I {} sh -c 'cat "$@" >> README.md' _ {}
find doc -type f -name "*.md" ! -name "readme.md" | sort | xargs -I {} sh -c 'cat "$@" >> README.md' _ {}
- name: Convert README.md to README.pdf
run: pandoc README.md -o README.pdf
- name: Upload PDF
uses: actions/upload-artifact@v4
with:
name: documentation-pdfs
path: README.pdf