Skip to content

Commit 46aaa60

Browse files
jeffaudicursoragent
andcommitted
Publish documentation with GitHub Pages
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent ecec496 commit 46aaa60

8 files changed

Lines changed: 94 additions & 11 deletions

File tree

‎.github/workflows/README.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,24 @@ git push origin v0.1.0
5555
```
5656

5757
The tag push starts `publish.yml` and uploads to PyPI.
58+
59+
## `pages.yml`
60+
61+
Builds the MkDocs site and deploys it to GitHub Pages.
62+
63+
| Trigger | Action |
64+
|---------|--------|
65+
| Push to `main` touching docs/source/docs workflow files | Build `site/` and publish to Pages |
66+
| Manual **workflow_dispatch** | Build and publish on demand |
67+
68+
### One-time setup
69+
70+
In **Settings → Pages**, set:
71+
72+
- **Source:** GitHub Actions
73+
74+
The workflow publishes to:
75+
76+
```text
77+
https://dl4eo.github.io/oriented-det/
78+
```

‎.github/workflows/pages.yml‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Build and publish the MkDocs site to GitHub Pages.
2+
3+
name: Pages
4+
5+
on:
6+
push:
7+
branches: [main]
8+
paths:
9+
- "docs/**"
10+
- "oriented_det/**"
11+
- "mkdocs.yml"
12+
- "pyproject.toml"
13+
- ".github/workflows/pages.yml"
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
concurrency:
22+
group: pages
23+
cancel-in-progress: false
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: actions/setup-python@v5
32+
with:
33+
python-version: "3.12"
34+
35+
- name: Install documentation dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
39+
pip install -e ".[docs]"
40+
41+
- name: Build MkDocs site
42+
run: mkdocs build
43+
44+
- uses: actions/configure-pages@v5
45+
46+
- uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: site
49+
50+
deploy:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
steps:
57+
- id: deployment
58+
uses: actions/deploy-pages@v4

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ uv pip install -r requirements.txt
3232
uv pip install -e .
3333
```
3434

35-
- From PyPI (when published): `pip install oriented-det`
35+
- From PyPI: `pip install oriented-det`
3636
- For development and tests: `uv pip install -e ".[dev]"`
3737
- For **macOS Apple Silicon** or **CPU-only**, see [Installation](docs/getting-started/installation.md).
3838
- Verify: `pytest tests/test_geometry.py tests/test_iou.py tests/test_nms.py`
@@ -229,7 +229,7 @@ Create a [GitHub Release](https://github.com/DL4EO/oriented-det/releases) from t
229229

230230
#### 6. After publish
231231

232-
- Change install docs from “when published” to `pip install oriented-det`.
232+
- Verify `pip install oriented-det` in a clean environment.
233233
- Users still install **PyTorch** separately for their CUDA/CPU platform.
234234

235235
### Makefile targets

‎docs/README.md‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@ Output is in `site/`.
2525

2626
Then open http://127.0.0.1:8000 in your browser.
2727

28-
## Deploy (e.g. GitHub Pages)
28+
## Deploy (GitHub Pages)
2929

30-
```bash
31-
mkdocs gh-deploy
32-
```
30+
The public site is deployed by `.github/workflows/pages.yml`.
31+
32+
One-time repository setup: in **Settings → Pages**, set **Source** to **GitHub Actions**.
3333

34-
This pushes the built site to the `gh-pages` branch.
34+
After that, pushes to `main` that touch docs/source files publish to:
35+
36+
```text
37+
https://dl4eo.github.io/oriented-det/
38+
```
3539

3640
## Structure
3741

‎docs/getting-started/installation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ uv pip install -r requirements.txt
5656
uv pip install -e .
5757
```
5858

59-
From PyPI (when published):
59+
From PyPI:
6060

6161
```bash
6262
pip install oriented-det

‎docs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Hands-on installation and a minimal walkthrough are in [Getting Started](getting
5454

5555
## Installation
5656

57-
From PyPI (when published):
57+
From PyPI:
5858

5959
```bash
6060
pip install oriented-det

‎mkdocs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
site_name: OrientedDet Documentation
22
site_description: A lightweight, modern PyTorch library for rotated object detection
33
site_author: Jeff Faudi, DL4EO
4-
site_url: https://github.com/DL4EO/oriented-det
4+
site_url: https://dl4eo.github.io/oriented-det/
55

66
repo_name: DL4EO/oriented-det
77
repo_url: https://github.com/DL4EO/oriented-det

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ all = [
8282

8383
[project.urls]
8484
Homepage = "https://github.com/DL4EO/oriented-det"
85-
Documentation = "https://github.com/DL4EO/oriented-det#readme"
85+
Documentation = "https://dl4eo.github.io/oriented-det/"
8686
Repository = "https://github.com/DL4EO/oriented-det"
8787
Issues = "https://github.com/DL4EO/oriented-det/issues"
8888
"Bug Tracker" = "https://github.com/DL4EO/oriented-det/issues"

0 commit comments

Comments
 (0)