File tree Expand file tree Collapse file tree 4 files changed +29
-7
lines changed
Expand file tree Collapse file tree 4 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,13 @@ name: Build and Deploy Docs
22on :
33 push :
44 branches :
5- - main # Set this to your default branch
5+ - main
6+ workflow_dispatch :
67
78permissions :
8- contents : write
9+ contents : read
10+ pages : write
11+ id-token : write
912
1013jobs :
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 :
Original file line number Diff line number Diff line change @@ -10,4 +10,8 @@ wheels/
1010.venv
1111uv.lock
1212input.txt
13+
14+ # Sphinx build artifacts
1315docs /_build /
16+ docs /tether. * .rst
17+ docs /modules.rst
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11import os
22import sys
3+ import re
34# Ensure Sphinx can find the source code
45sys .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+ ]
You can’t perform that action at this time.
0 commit comments