From 0777aab31e07748b9f1f5bda73f6a6fa936cb54d Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Sat, 7 Oct 2023 18:57:50 +0900 Subject: [PATCH] ci/rtfd: building both fast docs on PR (#18738) --- .readthedocs.yml | 9 ++++++--- docs/crossroad.html | 15 +++++++++++++++ docs/rtfd-build.sh | 21 ++++++++++++++++----- 3 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 docs/crossroad.html diff --git a/.readthedocs.yml b/.readthedocs.yml index 5da58d8e65..625c56a5fe 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -39,12 +39,15 @@ build: commands: - printenv - pwd ; ls -lh - - pip install -U pip awscli --user + - pip install -U pip awscli py-tree --user - python -m awscli s3 sync --no-sign-request s3://sphinx-packages/ dist/ ; ls -lh dist/ - > - pip install -e . -q -r requirements/pytorch/docs.txt -r _notebooks/.actions/requires.txt \ + pip install -e . -q -r _notebooks/.actions/requires.txt \ + -r requirements/fabric/docs.txt \ + -r requirements/pytorch/docs.txt \ -f 'https://download.pytorch.org/whl/cpu/torch_stable.html' -f dist/ ; pip list # this need to be split so `sphinx-build` is picked from previous installation - bash docs/rtfd-build.sh - - mkdir -p _readthedocs ; mv docs/build/html _readthedocs/html + - cd docs/build ; python -m py_tree --depth_limit=1 + - mkdir -p _readthedocs ; mv docs/build _readthedocs/html diff --git a/docs/crossroad.html b/docs/crossroad.html new file mode 100644 index 0000000000..0c25930c63 --- /dev/null +++ b/docs/crossroad.html @@ -0,0 +1,15 @@ + + + + RTFD cross-road + + + + + + + diff --git a/docs/rtfd-build.sh b/docs/rtfd-build.sh index 23980b7268..5501e0da35 100644 --- a/docs/rtfd-build.sh +++ b/docs/rtfd-build.sh @@ -2,12 +2,23 @@ if ! [ $READTHEDOCS_VERSION == "latest" -o $READTHEDOCS_VERSION == "stable" ]; then - cd ./docs/source-pytorch ; export FAST_DOCS_DEV=1 ; - make html --jobs $(nproc) ; - ls -lh ../build + root=$(pwd) ; + # build Fabric + cd $root/docs/source-fabric ; + make html --jobs $(nproc) ; + cd $root/docs ; + mv build/html build/fabric ; + # build PyTorch + cd $root/docs/source-pytorch ; + make html --jobs $(nproc) ; + cd $root/docs ; + mv build/html build/pytorch ; + # cross-road + rm -rf build/doctrees ; + cp crossroad.html build/index.html else echo "Void build... :-]" ; - mkdir -p ./docs/build/html - cp ./docs/redirect.html ./docs/build/html/index.html + mkdir -p ./docs/build + cp ./docs/redirect.html ./docs/build/index.html fi