Skip to content
Merged
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
53 changes: 53 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: deploy-docs

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: pip install -e .[dev]

- name: Regenerate paper gallery artifacts
run: python tools/paper_examples/build_gallery.py

- name: Build Sphinx docs
run: python -m sphinx -W -b html docs docs/_build/html

- name: Add .nojekyll marker
run: touch docs/_build/html/.nojekyll

- name: Configure Pages
uses: actions/configure-pages@v5

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 7 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
author = "Cajigas Lab"
release = "0.3.0"
extensions = ["myst_parser"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "superpowers"]
master_doc = "index"

html_theme = "sphinx_rtd_theme"
html_theme_options = {
"navigation_depth": 3,
"collapse_navigation": False,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# GitHub Pages Deployment Design

**Date:** 2026-03-24
**Status:** Approved

## Problem

The Python nSTAT GitHub Pages site (cajigaslab.github.io/nSTAT-python/) is frozen at a Feb 28, 2026 commit. The `docs-build` CI job verifies Sphinx compilation but never deploys the output. Over 20 merges to main have had no effect on the live site.

## Solution

A dedicated `deploy-docs.yml` workflow that builds Sphinx HTML with the Read the Docs theme and deploys it to GitHub Pages on every push to main.

## Components

### 1. `.github/workflows/deploy-docs.yml`

New workflow triggered by push to main and workflow_dispatch. Uses GitHub's artifact-based Pages deployment (`actions/upload-pages-artifact` + `actions/deploy-pages`). Requires `pages: write` and `id-token: write` permissions. Concurrency group prevents overlapping deployments.

### 2. `docs/conf.py` updates

Switch from Alabaster (default) to `sphinx_rtd_theme`. Keep `myst_parser` extension. Set project metadata.

### 3. `pyproject.toml` updates

Add `sphinx-rtd-theme` to dev dependencies if not already present.

### 4. `.nojekyll` marker

Created during build to prevent Jekyll from ignoring `_static/` directories.

## What Gets Deployed

The existing docs/index.rst toctree: help home, paper overview, class definitions, examples, API reference, paper examples gallery with figure thumbnails.

## What Doesn't Change

The existing `docs-build` job in ci.yml remains as a PR build-verification step.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dev = [
"pytest>=8.0",
"scikit-image>=0.22",
"sphinx>=8.0",
"sphinx-rtd-theme>=3.0",
"myst-parser>=4.0",
]

Expand Down
Loading