diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..f75383b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,45 @@ +name: Deploy Documentation + +on: + push: + branches: + - main + paths: + - 'docs/**' + - 'mkdocs.yml' + - '.github/workflows/docs.yml' + workflow_dispatch: # Allow manual trigger + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all history for git-revision-date-localized plugin + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('requirements-docs.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -r requirements-docs.txt + + - name: Build and deploy documentation + run: mkdocs gh-deploy --force + diff --git a/.gitignore b/.gitignore index ef4d797..d52fb2e 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,9 @@ temp/ tmp/ .cache/ +# MkDocs build output +site/ + data output diff --git a/requirements-docs.txt b/requirements-docs.txt new file mode 100644 index 0000000..042059a --- /dev/null +++ b/requirements-docs.txt @@ -0,0 +1,7 @@ +# Documentation build dependencies +# Install with: pip install -r requirements-docs.txt + +mkdocs-material>=9.6.0 +mkdocs-git-revision-date-localized-plugin>=1.5.0 +mkdocs-static-i18n>=1.2.0 +