File tree Expand file tree Collapse file tree 3 files changed +56
-8
lines changed
Expand file tree Collapse file tree 3 files changed +56
-8
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Sphinx Docs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+ permissions :
11+ contents : read
12+ pages : write
13+ id-token : write
14+
15+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+ concurrency :
18+ group : " pages"
19+ cancel-in-progress : false
20+
21+ jobs :
22+ build :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - name : Checkout
26+ uses : actions/checkout@v4
27+ - name : Setup Pages
28+ uses : actions/configure-pages@v5
29+ - name : Install uv
30+ uses : astral-sh/setup-uv@v5
31+ - name : Install package
32+ run : uv sync --extra docs
33+ - name : Build docs
34+ run : cd "$GITHUB_WORKSPACE/sphinx-docs" && uv run sphinx-build . _build/
35+ - name : Upload
36+ uses : actions/upload-pages-artifact@v3
37+ with :
38+ path : sphinx-docs/_build/
39+
40+ deploy :
41+ needs : build
42+ environment :
43+ name : github-pages
44+ url : ${{ steps.deployment.outputs.page_url }}
45+ runs-on : ubuntu-latest
46+ steps :
47+ - name : Deploy to GitHub Pages
48+ id : deployment
49+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -48,13 +48,9 @@ dev = [
4848 " sphinx==8.1.3" ,
4949 " recommonmark==0.7.1" ,
5050]
51- lightgbm = [
52- " synapseml>=1.0"
53- ]
54- xgboost = [
55- " xgboost>=2.0" ,
56- " pyarrow>=4.0" ,
57- ]
51+ docs = [" sphinx" , " recommonmark" ]
52+ lightgbm = [" synapseml>=1.0" ]
53+ xgboost = [" xgboost>=2.0" , " pyarrow>=4.0" ]
5854
5955[project .scripts ]
6056hlink = " hlink.scripts.main:cli"
Original file line number Diff line number Diff line change 3232
3333# -- General configuration ---------------------------------------------------
3434
35+ # add CNAME to sphinx docs
36+ html_baseurl = "hlink.docs.ipums.org"
37+
3538# Add any Sphinx extension module names here, as strings. They can be
3639# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3740# ones.
38- extensions = ["recommonmark" , "sphinx.ext.autodoc" ]
41+ extensions = ["recommonmark" , "sphinx.ext.autodoc" , "sphinx.ext.githubpages" ]
3942
4043# Add any paths that contain templates here, relative to this directory.
4144templates_path = ["_templates" ]
You can’t perform that action at this time.
0 commit comments