Skip to content

Commit f5e0978

Browse files
committed
chore: Update GitHub workflow to convert README to PDF
1 parent 0fd45a7 commit f5e0978

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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

0 commit comments

Comments
 (0)