forked from liuyun201990/plotly_express
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_docs.sh
executable file
·44 lines (32 loc) · 998 Bytes
/
make_docs.sh
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
#!/bin/bash
# stop on errors
set -e
# install everything including local version
pip install -r requirements.txt
# reset doc build dir
rm -rf doc_build
mkdir doc_build
# generate HTML reference docs
pdoc plotly_express --html --html-dir=doc_build --overwrite --template-dir=docs/templates
for NB in walkthrough gallery
do
# make unexecuted IPYNB files from MD files (overwrites)
jupytext --to notebook $NB.md
# create executed IPYNB files in the build dir
jupyter nbconvert --execute --to notebook $NB.ipynb --output doc_build/$NB.ipynb
# convert executed doc_build/IPYNB files to doc_build/HTML using template
jupyter nbconvert doc_build/$NB.ipynb --template=docs/nb.tpl
done
cd doc_build
echo www.plotly.express >> CNAME
echo plotly_express >> requirements.txt
mv gallery.html index.html
if [ "$1" == "deploy" ]
then
# push to gh-pages
git init
git add .
git commit -m doc_build
git push --force [email protected]:plotly/plotly_express.git master:gh-pages
fi
cd ..