File tree Expand file tree Collapse file tree 1 file changed +23
-17
lines changed
Expand file tree Collapse file tree 1 file changed +23
-17
lines changed Original file line number Diff line number Diff line change 1- name : Generate PDF
1+ # .github/workflows/convert-to-pdf.yml
22
3+ name : Docs to PDF
4+ # This workflow is triggered on pushes to the repository.
35on :
46 push :
57 branches :
6- - main # Change this to your branch name if necessary
8+ - main
9+ # Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory
10+ paths :
11+ - ' **.md'
12+ - ' images/**'
713
814jobs :
9- build :
15+ converttopdf :
16+ name : Build PDF
1017 runs-on : ubuntu-latest
11-
1218 steps :
13- - name : Checkout code
14- uses : actions/checkout@v2
15-
16- - name : Setup Node.js
17- uses : actions/setup-node@v2
19+ - uses : actions/checkout@v2
20+ - uses : baileyjm02/markdown-to-pdf@v1
1821 with :
19- node-version : " 14"
20-
21- - name : Install dependencies
22- run : npm install puppeteer
23-
24- - name : Generate PDF
25- run : |
26- npx puppeteer print README.md --pdf ./assets/README.pdf
22+ input_dir : docs
23+ output_dir : pdfs
24+ images_dir : docs/images
25+ # for example <img src="./images/file-name.png">
26+ image_import : ./images
27+ # Default is true, can set to false to only get PDF files
28+ build_html : false
29+ - uses : actions/upload-artifact@v1
30+ with :
31+ name : docs
32+ path : pdfs
You can’t perform that action at this time.
0 commit comments