Skip to content

Commit

Permalink
Add initial RTD configuration (#1060)
Browse files Browse the repository at this point in the history
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
  • Loading branch information
chrysle and webknjaz authored Nov 30, 2023
1 parent aa5e940 commit d83e7c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 41 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/publish_docs.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"
commands:
- pip install nox
- nox --session build_docs -- "${READTHEDOCS_OUTPUT}"/html
11 changes: 2 additions & 9 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,14 @@ def publish(session):

@nox.session(python=PYTHON_DEFAULT_VERSION)
def build_docs(session):
site_dir = session.posargs or ["site/"]
session.run("python", "-m", "pip", "install", "--upgrade", "pip")
session.install(*DOC_DEPENDENCIES)
session.env[
"PIPX__DOC_DEFAULT_PYTHON"
] = "typically the python used to execute pipx"
session.run("python", "scripts/generate_docs.py")
session.run("mkdocs", "build", "--strict")


@nox.session(python=PYTHON_DEFAULT_VERSION)
def publish_docs(session):
session.run("python", "-m", "pip", "install", "--upgrade", "pip")
session.install(*DOC_DEPENDENCIES)
build_docs(session)
session.run("mkdocs", "gh-deploy", "--strict")
session.run("mkdocs", "build", "--strict", "--site-dir", *site_dir)


@nox.session(python=PYTHON_DEFAULT_VERSION)
Expand Down

0 comments on commit d83e7c2

Please sign in to comment.