committed by
GitHub
1 changed files with 22 additions and 25 deletions
@ -1,32 +1,29 @@ |
|||||
name: Convert PDF to Markdown |
name: Docs to PDF |
||||
|
# This workflow is triggered on pushes to the repository. |
||||
on: |
on: |
||||
push: |
push: |
||||
|
branches: |
||||
|
- master |
||||
|
# Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory |
||||
paths: |
paths: |
||||
- '**.md' |
- '**/**.md' |
||||
|
|
||||
jobs: |
jobs: |
||||
convert_md: |
converttopdf: |
||||
|
name: Build PDF |
||||
runs-on: ubuntu-latest |
runs-on: ubuntu-latest |
||||
steps: |
steps: |
||||
# We must checkout the latest version of the code to get a copy of all .md files |
- uses: actions/checkout@v2 |
||||
- name: Checkout Code |
- uses: baileyjm02/markdown-to-pdf@v1 |
||||
uses: actions/[email protected] |
with: |
||||
with: |
input_dir: docs |
||||
fetch-depth: 1 |
output_dir: pdfs |
||||
- name: Create .pdfs |
images_dir: docs/images |
||||
uses: scottypate/[email protected] |
# for example <img src="./images/file-name.png"> |
||||
env: { |
image_import: ./images |
||||
# Use this parameter to determine where the generated .pdf(s) will be stored. |
# Default is true, can set to false to only get PDF files |
||||
PDF_DIR: './pdfs' |
build_html: false |
||||
} |
- uses: actions/upload-artifact@v1 |
||||
- name: Create Pull Request |
with: |
||||
uses: peter-evans/[email protected] |
name: docs |
||||
env: |
path: pdfs |
||||
# The token is built in to actions. No config required. |
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
||||
COMMIT_MESSAGE: Add .pdf files. |
|
||||
PULL_REQUEST_TITLE: Add .pdf files. |
|
||||
PULL_REQUEST_BRANCH: pdf-add |
|
||||
PULL_REQUEST_BODY: :wave: Run.pdf |
|
||||
PULL_REQUEST_REVIEWERS: scottypate |
|
||||
|
Loading…
Reference in new issue