Skip to content

Commit

Permalink
ci: build app's docs with RTFD (Lightning-AI#19147)
Browse files Browse the repository at this point in the history
* ci: build app's docs with RTFD
* set -ex
* .[app]
  • Loading branch information
Borda authored Dec 13, 2023
1 parent 360b124 commit e769e23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ build:
- 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 _notebooks/.actions/requires.txt \
pip install -e ".[app]" -q -r _notebooks/.actions/requires.txt \
-r requirements/app/docs.txt \
-r requirements/fabric/docs.txt \
-r requirements/pytorch/docs.txt \
-f 'https://download.pytorch.org/whl/cpu/torch_stable.html' -f dist/ ;
Expand Down
1 change: 1 addition & 0 deletions docs/crossroad.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</style>
</head>
<body>
<a href="app/"><button>App</button></a>
<a href="fabric/"><button>Fabric</button></a>
<a href="pytorch/"><button>PyTorch</button></a>
</body>
Expand Down
18 changes: 8 additions & 10 deletions docs/rtfd-build.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# building for PRs and skip stable and latest states
set -ex

if ! [ $READTHEDOCS_VERSION == "latest" -o $READTHEDOCS_VERSION == "stable" ];
then
export FAST_DOCS_DEV=1 ;
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 ;
for pkg in 'app' 'fabric' 'pytorch' ;
do
cd $root/docs/source-$pkg ;
make html --jobs $(nproc) ;
cd $root/docs ;
mv build/html build/$pkg ;
done ;
# cross-road
rm -rf build/doctrees ;
cp crossroad.html build/index.html
Expand Down

0 comments on commit e769e23

Please sign in to comment.