-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.08 KB
/
pipeline.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
37
38
39
40
41
42
name: Convert Markdown with Mermaid to PDF
on:
push:
paths:
- '**/*.md'
workflow_dispatch:
jobs:
convert_md_to_pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pandoc
run: |
sudo apt-get install -y pandoc texlive-latex-recommended \
texlive-pictures texlive-latex-extra texlive-fonts-recommended
npm i -g mermaid-filter
- name: install mermaid-filter and Convert Markdown to PDF
run: |
pandoc -F mermaid-filter cool-root-doc.md -o cool-root-doc.pdf
# pip install pandoc-mermaid-filter
# for file in $(find . -name '*.md'); do
# pdf_file="${file%.md}.pdf"
# pandoc --filter=pandoc-mermaid-filter "$file" -o "$pdf_file" --pdf-engine=xelatex
# done
- name: Upload PDFs as artifacts
uses: actions/upload-artifact@v3
with:
name: converted-pdfs
path: '**/*.pdf'