check mkdocs #3
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 | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| pip install uv | |
| uv venv | |
| uv pip install mkdocs mkdocs-material mkdocstrings[python] | |
| - name: Build MkDocs | |
| run: uv run mkdocs build --strict | |
| #- name: Deploy to GitHub Pages | |
| # run: uv run mkdocs gh-deploy --force | |
| - name: Deploy to GitHub Pages git gh-pages branch | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| uv run mkdocs gh-deploy --force --remote-branch gh-pages | |