File tree Expand file tree Collapse file tree 3 files changed +19
-18
lines changed Expand file tree Collapse file tree 3 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,11 @@ SOURCE_BRANCH="master"
88TARGET_BRANCH=" gh-pages"
99DOC_BUILD_DIR=" _build/html/"
1010
11- if [ " ${TRAVIS_PULL_REQUEST} " != " false" -o -z " ${TRAVIS_TAG} " ]; then
11+ if [ " ${TRAVIS_PULL_REQUEST} " != " false" ]; then
1212 echo " Skipping documentation deploy."
1313 exit 0
1414fi
1515
16- pip install -r docs/requirements.txt
17- make htmldocs
18-
1916git config --global user.email " infra@magic.io"
2017git config --global user.name " Travis CI"
2118
@@ -29,14 +26,15 @@ cd docs/gh-pages
2926git checkout " ${TARGET_BRANCH} " || git checkout --orphan " ${TARGET_BRANCH} "
3027cd ..
3128
32- rm -r gh-pages/devel/
33- rsync -a " ${DOC_BUILD_DIR} /" gh-pages/devel/
34-
35- if [ -n " ${TRAVIS_TAG} " ]; then
36- rm -r gh-pages/current/
37- rsync -a " ${DOC_BUILD_DIR} /" gh-pages/current/
29+ if [ -z " ${TRAVIS_TAG} " ]; then
30+ VERSION=" devel"
31+ else
32+ VERSION=" current"
3833fi
3934
35+ rm -r " gh-pages/${VERSION} /"
36+ rsync -a " ${DOC_BUILD_DIR} /" " gh-pages/${VERSION} /"
37+
4038cd gh-pages
4139
4240if git diff --quiet --exit-code; then
Original file line number Diff line number Diff line change 22
33set -e -x
44
5-
65if [ -z " ${TRAVIS_TAG} " ]; then
76 # Not a release
87 exit 0
@@ -51,5 +50,3 @@ for distfile in "${expected_wheels[@]}"; do
5150done
5251
5352python -m twine upload dist/* .whl dist/* .tar.*
54-
55- .ci/travis-publish-docs.sh
Original file line number Diff line number Diff line change @@ -152,8 +152,14 @@ script:
152152 - .ci/travis-build-wheels.sh
153153
154154deploy :
155- provider : script
156- script : .ci/travis-release.sh
157- on :
158- tags : true
159- condition : ' "${BUILD}" == *release*'
155+ - provider : script
156+ script : .ci/travis-release.sh
157+ on :
158+ tags : true
159+ condition : ' "${BUILD}" == *release*'
160+
161+ - provider : script
162+ script : .ci/travis-publish-docs.sh
163+ on :
164+ branch : master
165+ condition : ' "${BUILD}" == *docs*'
You can’t perform that action at this time.
0 commit comments