forked from jupyterlite/ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.readthedocs.yaml
More file actions
45 lines (38 loc) · 1.26 KB
/
Copy path.readthedocs.yaml
File metadata and controls
45 lines (38 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-24.04
tools:
python: "3.12"
nodejs: "22"
jobs:
# Build JupyterLite assets
pre_build:
- | # build lite and update doc URL if the doc is for a PR
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ]; then
pip install uv
pip install "jupyterlab>=4.0.0,<5"
jlpm install
jlpm build:prod
uv python install
uv sync --locked --all-extras --dev --directory=demo
mkdir -p demo/contents
cp demo/README.md demo/contents/
uv run --directory=demo jupyter lite build
sed -i "s|https://jupyterlite.github.io/ai/lab/index.html|/lite/lab/index.html|g" docs/index.md
fi
# Build documentation
build:
html:
- pip install jupyter-book
- npm run docs:build
# Copy documentation output
- mkdir -p $READTHEDOCS_OUTPUT/html
- cp -r _build/html/* $READTHEDOCS_OUTPUT/html/
- rm -rf _build
# Copy JupyterLite into docs
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ]; then
mv demo/dist $READTHEDOCS_OUTPUT/html/lite
fi