Skip to content

Commit

Permalink
Build on Read the Docs
Browse files Browse the repository at this point in the history
Use new `build.os` and `build.tools` configs from the `.readthedocs.yaml` config
file to use Ubuntu 20.04 LTS and install NodeJS v14.

Run `npx gulp build` from inside `conf.py` before building documentation with
Sphinx.
  • Loading branch information
humitos committed Sep 29, 2021
1 parent 5527d43 commit dc94eed
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "3.10"
nodejs: "14"

sphinx:
configuration: docs/conf.py

python:
install:
- method: pip
path: .
extra_requirements:
- doc
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import subprocess
import sys

# add the demo python code to the path, so that it can be used to demonstrate
Expand Down Expand Up @@ -87,3 +88,10 @@
"</a>!"
)
}

# Generate JS/CSS assets before running Sphinx
subprocess.run([
'npx',
'gulp',
'build',
])

0 comments on commit dc94eed

Please sign in to comment.