File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/convert-to-pdf.yml
2+
3+ name : Docs to PDF
4+ # This workflow is triggered on pushes to the repository.
5+ on :
6+ push :
7+ branches :
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 or the README.md file
10+ paths :
11+ - ' docs/**.md'
12+ - ' docs/images/**'
13+ - ' README.md'
14+
15+ jobs :
16+ converttopdf :
17+ name : Build PDF
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v3
21+ - uses : baileyjm02/markdown-to-pdf@v1
22+ with :
23+ input_dir : docs
24+ output_dir : pdfs
25+ images_dir : docs/images
26+ # for example <img src="./images/file-name.png">
27+ image_import : ./images
28+ # Default is true, can set to false to only get PDF files
29+ build_html : false
30+ - name : Convert README.md to PDF
31+ run : |
32+ mkdir -p pdfs
33+ npx markdown-pdf README.md -o pdfs/README.pdf
34+ - uses : actions/upload-artifact@v3
35+ with :
36+ name : docs
37+ path : pdfs
You can’t perform that action at this time.
0 commit comments