Skip to content

Commit b849f7b

Browse files
authored
Update main.yml
1 parent 32ac4ee commit b849f7b

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/main.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,20 @@ jobs:
1818

1919
- name: Install pandoc and LaTeX
2020
run: |
21-
sudo apt-get install -y pandoc texlive-xetex texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
22-
23-
- name: Merge Markdown files
21+
sudo apt-get update
22+
sudo apt-get install -y pandoc texlive-xetex texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra tree imagemagick
23+
24+
- name: Generate documentation tree image
25+
run: |
26+
tree doc -I 'node_modules|.git' -L 2 -o tree.txt
27+
convert -density 150 tree.txt -trim tree.png
28+
29+
- name: Merge Markdown files and insert tree image
2430
run: |
2531
touch combined.md
26-
cat doc/readme.md > combined.md
27-
find doc -type f -name "*.md" ! -name "readme.md" !-name "doc-tree.md" | sort | xargs -I {} sh -c 'cat "$@" >> combined.md' _ {}
32+
echo "![](tree.png)" > combined.md
33+
cat doc/readme.md >> combined.md
34+
find doc -type f -name "*.md" ! -name "readme.md" ! -name "doc-tree.md" | sort | xargs -I {} sh -c 'cat "$@" >> combined.md' _ {}
2835
2936
- name: Convert README.md to README.pdf
3037
run: pandoc combined.md -o README.pdf --pdf-engine=xelatex

0 commit comments

Comments
 (0)