Commit 1b10292c by Henry Schreiner Committed by GitHub

chore: support PDF from nox (#3121)

parent 55f6f6e9
......@@ -53,14 +53,18 @@ def docs(session: nox.Session) -> None:
session.install("-r", "docs/requirements.txt")
session.chdir("docs")
if "pdf" in session.posargs:
session.run("sphinx-build", "-M", "latexpdf", ".", "_build")
return
session.run("sphinx-build", "-M", "html", ".", "_build")
if session.posargs:
if "serve" in session.posargs:
print("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
session.run("python", "-m", "http.server", "8000", "-d", "_build/html")
else:
print("Unsupported argument to docs")
if "serve" in session.posargs:
session.log("Launching docs at http://localhost:8000/ - use Ctrl-C to quit")
session.run("python", "-m", "http.server", "8000", "-d", "_build/html")
elif session.posargs:
session.error("Unsupported argument to docs")
@nox.session(reuse_venv=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment