Skip to content

Commit fda9ba8

Browse files
authored
Merge pull request #26 from Imaging-Plaza/docs/initial-documentation
feat: add MkDocs documentation setup and deployment commands
2 parents 0b4e035 + 26094f3 commit fda9ba8

26 files changed

+907
-4532
lines changed

.github/workflows/docs_pages.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "v*"
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
deploy-docs:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
29+
- name: Install documentation dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
python -m pip install -e ".[docs]"
33+
34+
- name: Validate documentation build
35+
run: mkdocs build --strict
36+
37+
- name: Configure git identity for mike
38+
run: |
39+
git config user.name "github-actions[bot]"
40+
git config user.email "github-actions[bot]@users.noreply.github.com"
41+
42+
- name: Deploy dev and latest aliases from main
43+
if: github.ref == 'refs/heads/main'
44+
run: mike deploy --push --branch gh-pages --update-aliases dev latest
45+
46+
- name: Deploy release version from tag and update stable alias
47+
if: startsWith(github.ref, 'refs/tags/v')
48+
run: |
49+
VERSION="${GITHUB_REF_NAME#v}"
50+
mike deploy --push --branch gh-pages --update-aliases "${VERSION}" stable
51+
mike set-default --push --branch gh-pages stable

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
All notable changes to this project will be documented in this file.
44

55

6+
## [2.0.1] - 2026-02-16
7+
8+
### Added
9+
- Documentation and CI for github-pages
10+
11+
### Changed
12+
- Bumped project version to `2.0.1`.
13+
- Updated API version metadata and root welcome message to `v2.0.1`.
14+
15+
16+
617
## [2.0.0] - 2025-10-07
718

819
### Added

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,48 @@ python src/main.py --url https://github.com/qchapp/lungs-segmentation --output_p
7979

8080
If no arguments are provided, it will use the default repository and output path.
8181

82+
## Versioned documentation (GitHub Pages)
83+
84+
The repository includes a versioned documentation site under `docs/` powered by MkDocs Material + Mike.
85+
86+
Install docs dependencies:
87+
88+
```bash
89+
uv pip install -e ".[docs]"
90+
```
91+
92+
Local docs preview:
93+
94+
```bash
95+
just docs-serve
96+
```
97+
98+
Strict docs build:
99+
100+
```bash
101+
just docs-build
102+
```
103+
104+
Manual publish commands:
105+
106+
```bash
107+
# Publish dev/latest from current branch
108+
just docs-deploy-dev
109+
110+
# Publish a release version and update stable alias
111+
just docs-deploy-release 2.0.1
112+
113+
# Set default version in selector
114+
just docs-set-default stable
115+
```
116+
117+
Automation:
118+
119+
- `.github/workflows/docs_pages.yml` publishes docs on:
120+
- Pushes to `main` (`dev` + `latest`)
121+
- Pushes of tags matching `v*` (release version + `stable`)
122+
- Configure GitHub Pages to serve from the `gh-pages` branch root.
123+
82124
## How to run the tool using Docker?
83125

84126
1. You need to build the image.

0 commit comments

Comments
 (0)