diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 072c9e4..7f3bbc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: docs/build + path: docs/build/html name: github-pages diff --git a/docs/conf.py b/docs/source/conf.py similarity index 96% rename from docs/conf.py rename to docs/source/conf.py index 9f90ab8..fdbc66f 100644 --- a/docs/conf.py +++ b/docs/source/conf.py @@ -7,7 +7,7 @@ import os import sys -sys.path.insert(0, os.path.abspath("../src")) +sys.path.insert(0, os.path.abspath("../../src")) # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information diff --git a/docs/document.rst b/docs/source/document.rst similarity index 100% rename from docs/document.rst rename to docs/source/document.rst diff --git a/noxfile.py b/noxfile.py index 7a1cc57..19cb33c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -51,4 +51,10 @@ def docs(session: nox.Session) -> None: session.install(".[docs]") session.install("sphinx_rtd_theme") session.chdir("docs") - session.run("sphinx-build", "-M", "html", ".", "build") + session.run("sphinx-build", "-M", "html", "source/", "build") + +@nox.session +def serve(session: nox.Session) -> None: + docs(session) + print("Launching docs at http://localhost:8000/ - use Ctrl-C to quit") + session.run("python", "-m", "http.server", "8000", "-d", "build/html") \ No newline at end of file