diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..28341fd7 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,54 @@ +name: Deploy Documentation to Github Pages + +on: workflow_dispatch + # Alternative: trigger deployment on push + # push: + # branches: [main] + +# Cancel any in-progress job or run +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + deploy-to-gh-pages: + runs-on: ubuntu-24.04 + environment: + name: documentation-github-pages + url: ${{ steps.deployment.outputs.page_url }} + permissions: + pages: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + - name: Enable github problem matcher + uses: sphinx-doc/github-problem-matcher@master + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U pip setuptools wheel + pip install .[docs] + - name: Sphinx build + run: > + sphinx-build + -b html ./docs ./docs/_builds + -v + --jobs=auto + --show-traceback + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Path to build dir, see 'sphinx run' + path: './docs/_builds' + - id: deployment + name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 + + + diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..fadf193a --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +pingouin.stadtfeld.xyz \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 7868ed58..a9a74451 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -129,6 +129,20 @@ "doc_path": "docs", } +# -- 404 page ------------------------------------------------ + +# Remove default url prefix on 404 pages +# https://sphinx-notfound-page.readthedocs.io/en/latest/configuration.html#confval-notfound_urls_prefix +notfound_urls_prefix = None + +notfound_context = { + "title": "Page Not Found (404)", + "body": """ +
Sorry, we couldn't find that page.
+Try using the search box or go to the homepage.
+ """, +} # -- Intersphinx ------------------------------------------------