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 93f03cc commit e22fd43
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ jobs:
node-version: '20'

- name: Install dependencies
run: npm install puppeteer markdown-it markdown-it-pdf
run: npm install puppeteer markdown-it

- 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
- name: Convert README.md to README.html
run: npx markdown-it README.md -o README.html

- name: Convert README.html to README.pdf
run: |
npx markdown-it README.md -o README.html
npx puppeteer --headless --disable-gpu --print-to-pdf=README.pdf README.html
- name: Upload PDF
uses: actions/upload-artifact@v4
with:
name: documentation-pdfs
path: README.md
path: README.pdf

0 comments on commit e22fd43

Please sign in to comment.