Skip to content

Commit e022cae

Browse files
committed
chore: update Sphinx documentation build paths and fix directory structure
1 parent 2e43c26 commit e022cae

File tree

4 files changed

+29
-7
lines changed

4 files changed

+29
-7
lines changed

.github/workflows/docs.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ name: Build and Deploy Docs
22
on:
33
push:
44
branches:
5-
- main # Set this to your default branch
5+
- main
6+
workflow_dispatch:
67

78
permissions:
8-
contents: write
9+
contents: read
10+
pages: write
11+
id-token: write
912

1013
jobs:
1114
build:
@@ -25,14 +28,24 @@ jobs:
2528
python-version: "3.10"
2629

2730
- name: Install dependencies
31+
# Ensure 'docs' extra is defined in your pyproject.toml
2832
run: |
2933
uv sync --extra docs
3034
3135
- name: Build Sphinx Documentation
3236
run: |
37+
# Generate RST files if they are not already committed
38+
uv run sphinx-apidoc -o docs/ src/tether/
3339
cd docs
34-
mkdir -p source/_static
35-
uv run sphinx-build -M html source build -W
40+
mkdir -p _static
41+
uv run sphinx-build -M html ./ _build -W
42+
43+
- name: Upload artifact
44+
# This is the missing piece that links the jobs
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
# Path to the generated HTML files
48+
path: docs/_build/html
3649

3750
deploy:
3851
environment:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ wheels/
1010
.venv
1111
uv.lock
1212
input.txt
13+
14+
# Sphinx build artifacts
1315
docs/_build/
16+
docs/tether.*.rst
17+
docs/modules.rst

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ This will:
5252

5353
## License
5454

55-
[Apache-2.0](./LICENSE)
55+
[Apache-2.0](https://github.com/Khushiyant/tether/blob/main/LICENSE)
5656

docs/conf.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import re
34
# Ensure Sphinx can find the source code
45
sys.path.insert(0, os.path.abspath("../src"))
56

@@ -8,7 +9,7 @@ def get_project_metadata():
89
import pathlib
910
import sys
1011

11-
pyproject_path = pathlib.Path(__file__).parents[2] / "pyproject.toml"
12+
pyproject_path = pathlib.Path(__file__).parents[1] / "pyproject.toml"
1213
if sys.version_info >= (3, 11):
1314
import tomllib
1415

@@ -61,4 +62,8 @@ def get_project_metadata():
6162
"source_repository": "https://github.com/Khushiyant/tenso",
6263
"source_branch": "main",
6364
"source_directory": "docs/source/",
64-
}
65+
}
66+
67+
suppress_warnings = [
68+
'myst.xref_missing', # Suppress MyST cross-reference errors
69+
]

0 commit comments

Comments
 (0)