Skip to content

Commit 9aa18d0

Browse files
WIP: Restoring travis documentation build
1 parent f7a6048 commit 9aa18d0

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,17 @@ matrix:
5959
env:
6060
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" SLOW=true
6161

62+
# In allow_failures
63+
- dist: trusty
64+
env:
65+
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
6266
allow_failures:
6367
- dist: trusty
6468
env:
6569
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" SLOW=true
70+
- dist: trusty
71+
env:
72+
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
6673

6774
before_install:
6875
- echo "before_install"
@@ -91,6 +98,7 @@ before_script:
9198

9299
script:
93100
- echo "script start"
101+
- ci/run_build_docs.sh
94102
- ci/script_single.sh
95103
- ci/script_multi.sh
96104

ci/build_docs.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
if [ "${TRAVIS_OS_NAME}" != "linux" ]; then
4+
echo "not doing build_docs on non-linux"
5+
exit 0
6+
fi
7+
8+
cd "$TRAVIS_BUILD_DIR"/doc
9+
echo "inside $0"
10+
11+
if [ "$DOC" ]; then
12+
13+
echo "Will build docs"
14+
15+
source activate pandas
16+
17+
echo ###############################
18+
echo # Log file for the doc build #
19+
echo ###############################
20+
21+
echo ./make.py
22+
./make.py
23+
24+
echo ########################
25+
echo # Create and send docs #
26+
echo ########################
27+
28+
cd build/html
29+
git config --global user.email "[email protected]"
30+
git config --global user.name "pandas-docs-bot"
31+
32+
# create the repo
33+
git init
34+
35+
touch README
36+
git add README
37+
git commit -m "Initial commit" --allow-empty
38+
git branch gh-pages
39+
git checkout gh-pages
40+
touch .nojekyll
41+
git add --all .
42+
git commit -m "Version" --allow-empty
43+
44+
git remote remove origin
45+
git remote add origin "https://${PANDAS_GH_TOKEN}@github.com/pandas-dev/pandas-docs-travis.git"
46+
git fetch origin
47+
git remote -v
48+
49+
git push origin gh-pages -f
50+
fi
51+
52+
exit 0

ci/run_build_docs.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
echo "inside $0"
4+
5+
"$TRAVIS_BUILD_DIR"/ci/build_docs.sh 2>&1
6+
7+
# wait until subprocesses finish (build_docs.sh)
8+
wait
9+
10+
exit 0

0 commit comments

Comments
 (0)