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

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

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

- name: Convert README.html to README.pdf
run: |
npx puppeteer --headless --disable-gpu --print-to-pdf=README.pdf README.html
- name: Convert README.md to README.pdf
run: markdown-pdf README.md -o README.pdf

- name: Upload PDF
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit c9d11d8

Please sign in to comment.