Skip to content

Commit ecb2abf

Browse files
authored
Update main.yml
1 parent 564dd7f commit ecb2abf

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,27 @@ on:
44
branches: [ pdf ]
55
# paths:
66
# - 'doc/**' # Trigger when docs are updated
7-
7+
88
jobs:
99
convert_to_pdf:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313

14-
- name: Setup Node.js
14+
- name: Setup mdPDF
1515
uses: actions/setup-node@v4
1616
with:
1717
node-version: '20'
1818

1919
- name: Install md-to-pdf
2020
run: npm install -g md-to-pdf
2121

22-
- name: Merge Markdown files
23-
run: |
24-
find doc -type f -name "*.md" | sort | xargs -I {} sh -c 'cat "$@" >> README.md' _ {}
25-
2622
- name: Convert Markdown to PDF
2723
run: |
28-
sh -c md-to-pdf README.md > README.pdf
24+
find doc -name "*.md" -exec sh -c 'md-to-pdf "$1" > "${1%.md}.pdf"' _ {} \;
2925
30-
- name: Upload PDF
26+
- name: Upload PDFs
3127
uses: actions/upload-artifact@v4
3228
with:
3329
name: documentation-pdfs
34-
path: README.pdf
30+
path: doc/**/*.pdf

0 commit comments

Comments
 (0)