-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update GitHub workflow to convert README to PDF
- Loading branch information
1 parent
0fd45a7
commit f5e0978
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# .github/workflows/convert-to-pdf.yml | ||
|
||
name: Docs to PDF | ||
# This workflow is triggered on pushes to the repository. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
# 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 | ||
paths: | ||
- 'docs/**.md' | ||
- 'docs/images/**' | ||
- 'README.md' | ||
|
||
jobs: | ||
converttopdf: | ||
name: Build PDF | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: baileyjm02/markdown-to-pdf@v1 | ||
with: | ||
input_dir: docs | ||
output_dir: pdfs | ||
images_dir: docs/images | ||
# for example <img src="./images/file-name.png"> | ||
image_import: ./images | ||
# Default is true, can set to false to only get PDF files | ||
build_html: false | ||
- name: Convert README.md to PDF | ||
run: | | ||
mkdir -p pdfs | ||
npx markdown-pdf README.md -o pdfs/README.pdf | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs | ||
path: pdfs |