Merge pull request #165 from cmckee786/fixups #89
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: Build site with MkDocs and deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: ['main'] | |
| paths: | |
| - 'docs/**' | |
| - 'scripts/generate-resources' | |
| - 'mkdocs.yml' | |
| - '.github/workflows/deploy_mkdocs.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Format and build with MkDocs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| - uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: weasyprint | |
| version: 1.0 | |
| - name: Install pip dependencies | |
| run: pip install -U mkdocs mkdocs-material mkdocs-glightbox mkdocs-to-pdf | |
| - name: Generate resources.md files | |
| run: ./scripts/generate-resources | |
| - name: Build with MkDocs | |
| run: mkdocs build | |
| - name: Set up GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./site | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |