Merge branch 'main' of github.com:kartoza/TheKartozaHandbook #79
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
name: 📔 Compile MKDocs 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 | |
paths: | |
- ".github/workflows/CompileMKDocsToPDF.yml" | |
- "docs/**.md" | |
- "docs/assets/**" | |
# Allow manually running in the actions tab | |
workflow_dispatch: | |
jobs: | |
generatepdf: | |
name: Build PDF | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛒 | |
uses: actions/checkout@v3 | |
- name: Create Mkdocs Config 🚀 | |
working-directory: ./docs | |
run: ./create-mkdocs-pdf-config.sh | |
- name: Build PDF 📃 | |
uses: kartoza/mkdocs-deploy-build-pdf@master | |
# Uses orzih's mkdocs PDF builder | |
# https://github.com/orzih/mkdocs-with-pdf | |
env: | |
CONFIG_FILE: docs/mkdocs.yml | |
EXTRA_PACKAGES: build-base | |
#REQUIREMENTS: folder/requirements.txt | |
- name: Upload PDF Artifact ⚡ | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: docs/pdfs |