Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shenhuan2021 authored Jan 12, 2025
1 parent 32ac4ee commit b849f7b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@ jobs:

- name: Install pandoc and LaTeX
run: |
sudo apt-get install -y pandoc texlive-xetex texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- name: Merge Markdown files
sudo apt-get update
sudo apt-get install -y pandoc texlive-xetex texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra tree imagemagick
- name: Generate documentation tree image
run: |
tree doc -I 'node_modules|.git' -L 2 -o tree.txt
convert -density 150 tree.txt -trim tree.png
- name: Merge Markdown files and insert tree image
run: |
touch combined.md
cat doc/readme.md > combined.md
find doc -type f -name "*.md" ! -name "readme.md" !-name "doc-tree.md" | sort | xargs -I {} sh -c 'cat "$@" >> combined.md' _ {}
echo "![](tree.png)" > combined.md
cat doc/readme.md >> combined.md
find doc -type f -name "*.md" ! -name "readme.md" ! -name "doc-tree.md" | sort | xargs -I {} sh -c 'cat "$@" >> combined.md' _ {}
- name: Convert README.md to README.pdf
run: pandoc combined.md -o README.pdf --pdf-engine=xelatex
Expand Down

0 comments on commit b849f7b

Please sign in to comment.