Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs build #127

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
builder: html
configuration: docs/source/conf.py
Expand All @@ -9,8 +14,8 @@ formats:
- htmlzip

python:
version: 3.8
system_packages: true

build:
image: latest
install:
- requirements: docs/source/requirements.txt
- method: pip
path: .
system_packages: false
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx>=4
sphinx_rtd_theme
readthedocs-sphinx-search
10 changes: 6 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ def build_docs(session: nox.Session) -> None:
@nox.session(python=False, name="clean-docs")
def clean_docs(session: nox.Session) -> None:
"""Clean up the docs folder."""
build_dir = ROOT / "docs" / "build"
docs_dir = ROOT / "docs"

if (build_dir / "html").is_dir():
with session.chdir(build_dir):
shutil.rmtree("html")
if (docs_dir / "build").is_dir():
with session.chdir(docs_dir):
shutil.rmtree("build")

if (ROOT / "build").is_dir():
session.chdir(ROOT / "build")
Expand All @@ -47,3 +47,5 @@ def clean_docs(session: nox.Session) -> None:
def nuke(session):
"""Run all clean sessions."""
clean_docs(session)
if (ROOT / "__pycache__").is_dir():
shutil.rmtree("__pycache__")
Loading