Skip to content

Commit 22c6326

Browse files
committed
docs: consolidate sphinx and mkdocs into single-version zensical
Replace the dual sphinx (readthedocs) + mkdocs (gh-pages) stack with zensical: new zensical.toml (material theme, mkdocstrings on src), rewritten landing page, real docs/docs-test Makefile targets, a check-docs CI job, and a Pages-artifact deploy workflow. Remove conf.py, mkdocs.yml, .readthedocs.yml, docs/requirements.txt and the sphinx-only include shim pages
1 parent 59a780b commit 22c6326

19 files changed

Lines changed: 406 additions & 466 deletions

‎.github/workflows/docs.yml‎

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,48 @@
1-
# This is a basic workflow to help you get started with Actions
1+
# Deploys the documentation to GitHub Pages via the Pages artifact method
2+
# (repo setting: Pages source = "GitHub Actions").
3+
# NOTE: the docs-versioning phase of the migration replaces this with a
4+
# mike-based deploy to the gh-pages branch.
25

36
name: Docs
47

5-
# Controls when the workflow will run
68
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
89
push:
9-
branches: [ main ]
10-
11-
# Allows you to run this workflow manually from the Actions tab
10+
branches: [main]
1211
workflow_dispatch:
1312

14-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: pages
20+
cancel-in-progress: false
21+
1522
jobs:
16-
# This workflow contains a single job called "build"
17-
build:
18-
# The type of runner that the job will run on
23+
deploy-docs:
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
1927
runs-on: ubuntu-latest
20-
21-
# Steps represent a sequence of tasks that will be executed as part of the job
2228
steps:
23-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24-
- uses: actions/checkout@v2
29+
- name: Check out
30+
uses: actions/checkout@v4
2531
with:
32+
# deep clone incl. tags so hatch-vcs can derive the version
2633
fetch-depth: 0
27-
- uses: actions/setup-python@v2
28-
- run: pip install --upgrade pip && pip install mkdocs mkdocs-gen-files "mkdocstrings[python]" mkdocs-material
29-
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
30-
- name: Publish docs
31-
run: mkdocs gh-deploy
34+
35+
- name: Set up the environment
36+
uses: ./.github/actions/setup-python-env
37+
38+
- name: Build documentation
39+
run: uv run zensical build --clean
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v4
43+
with:
44+
path: site
45+
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

‎.github/workflows/main.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,18 @@ jobs:
7979
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }}
8080
env:
8181
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
82+
83+
check-docs:
84+
runs-on: ubuntu-latest
85+
steps:
86+
- name: Check out
87+
uses: actions/checkout@v4
88+
with:
89+
# deep clone incl. tags so hatch-vcs can derive the version
90+
fetch-depth: 0
91+
92+
- name: Set up the environment
93+
uses: ./.github/actions/setup-python-env
94+
95+
- name: Check if documentation can be built
96+
run: uv run zensical build -s

‎.pre-commit-config.yaml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Legacy sphinx config; excluded until it is removed in the docs phase
2-
exclude: '^docs/conf.py'
3-
41
minimum_pre_commit_version: 3.2.0
52
repos:
63
- repo: https://github.com/pre-commit/pre-commit-hooks

‎.readthedocs.yml‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎Makefile‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ publish: ## Publish a release to PyPI (CI-only via OIDC trusted publishing)
3838
@echo "Push a version tag (v*) to trigger a release."
3939

4040
.PHONY: docs
41-
docs: ## Build and serve the documentation (available after the docs phase)
42-
@echo "Docs are built with zensical from the docs phase onward."
41+
docs: ## Build and serve the documentation locally
42+
@uv run zensical serve
4343

4444
.PHONY: docs-test
45-
docs-test: ## Test if documentation can be built without errors (available after the docs phase)
46-
@echo "Docs are built with zensical from the docs phase onward."
45+
docs-test: ## Test if documentation can be built without warnings or errors
46+
@uv run zensical build -s
4747

4848
.PHONY: help
4949
help:

‎docs/Makefile‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎docs/_static/.gitignore‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎docs/authors.md‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎docs/changelog.md‎

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)