diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..8721e32 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,52 @@ +name: Deploy MkDocs Documentation + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + pull_request: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build-docs: + + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + - name: Install dependencies + run: uv pip install --system -r docs/requirements.txt + + - name: Build docs + run: mkdocs build --strict + + - name: Deploy to GitHub Pages + if: github.ref == 'refs/heads/main' + run: mkdocs gh-deploy --force diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..12bdb28 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +mkdocs==1.6.1 +mkdocs-material==9.7.6 +mkdocs-jupyter==0.26.3 +mkdocs-literate-nav==0.6.3