Update mkdocs.yml #91
This file contains hidden or 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: Deploy MkDocs to GitHub Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| # System packages needed by WeasyPrint (used by mkdocs-page-to-pdf) | |
| - name: Install system deps for PDF rendering | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libcairo2 \ | |
| libpango-1.0-0 \ | |
| libpangocairo-1.0-0 \ | |
| libgdk-pixbuf2.0-0 \ | |
| libffi-dev \ | |
| shared-mime-info \ | |
| fonts-noto \ | |
| fonts-noto-color-emoji | |
| - name: Install Python deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install \ | |
| mkdocs \ | |
| mkdocs-material \ | |
| "mkdocs-material[imaging]" \ | |
| "mkdocs-material[extras]" \ | |
| mkdocs-git-revision-date-localized-plugin \ | |
| mkdocs-to-pdf | |
| # Optional: build first so the job fails early if config is bad | |
| - name: Build | |
| run: mkdocs build --strict | |
| - name: Deploy | |
| run: mkdocs gh-deploy --force |