update md3 #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- 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-xetex \ | |
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 --pdf-engine=xelatex | |
# for file in $(find . -name '*.md'); do | |
# pdf_file="${file%.md}.pdf" | |
# pandoc -F mermaid-filter cool-root-doc.md -o cool-root-doc.pdf --pdf-engine=xelatex | |
# done | |
- name: Upload PDFs as artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: converted-pdfs | |
path: '**/*.pdf' |