Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deploy docs to Github pages #449

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -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



1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pingouin.stadtfeld.xyz
14 changes: 14 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": """
<h1>Page Not Found</h1>
<p>Sorry, we couldn't find that page.</p>
<p>Try using the search box or go to the homepage.</p>
""",
}

# -- Intersphinx ------------------------------------------------

Expand Down
Loading