forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_docs.sh
executable file
·49 lines (37 loc) · 1.28 KB
/
build_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
44
45
46
47
48
49
#!/bin/bash
cd "$TRAVIS_BUILD_DIR"
git show --pretty="format:" --name-only HEAD~5.. --first-parent | grep -P "rst|txt|doc"
if [ "$?" != "0" ]; then
echo "Skipping doc build, none were modified"
# nope, skip docs build
exit 0
fi
if [ x"$DOC_BUILD" != x"" ]; then
# we're running network tests, let's build the docs in the meantim
echo "Will build docs"
pip install sphinx==1.1.3 ipython==1.1.0
mv "$TRAVIS_BUILD_DIR"/doc /tmp
cd /tmp/doc
rm /tmp/doc/source/api.rst # no R
rm /tmp/doc/source/r_interface.rst # no R
echo ############################### > /tmp/doc.log
echo # Log file for the doc build # > /tmp/doc.log
echo ############################### > /tmp/doc.log
echo "" > /tmp/doc.log
echo -e "y\n" | ./make.py --no-api 2>&1
cd /tmp/doc/build/html
git config --global user.email "[email protected]"
git config --global user.name "pandas-docs-bot"
git init
touch README
git add README
git commit -m "Initial commit" --allow-empty
git branch gh-pages
git checkout gh-pages
touch .nojekyll
git add --all .
git commit -m "Version" --allow-empty
git remote add origin https://[email protected]/pandas-docs/pandas-docs-travis
git push origin gh-pages -f
fi
exit 0