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"
8
8
TARGET_BRANCH=" gh-pages"
9
9
DOC_BUILD_DIR=" _build/html/"
10
10
11
- if [ " ${TRAVIS_PULL_REQUEST} " != " false" -o -z " ${TRAVIS_TAG} " ]; then
11
+ if [ " ${TRAVIS_PULL_REQUEST} " != " false" ]; then
12
12
echo " Skipping documentation deploy."
13
13
exit 0
14
14
fi
15
15
16
- pip install -r docs/requirements.txt
17
- make htmldocs
18
-
19
16
git config --global user.email " infra@magic.io"
20
17
git config --global user.name " Travis CI"
21
18
@@ -29,14 +26,15 @@ cd docs/gh-pages
29
26
git checkout " ${TARGET_BRANCH} " || git checkout --orphan " ${TARGET_BRANCH} "
30
27
cd ..
31
28
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"
38
33
fi
39
34
35
+ rm -r " gh-pages/${VERSION} /"
36
+ rsync -a " ${DOC_BUILD_DIR} /" " gh-pages/${VERSION} /"
37
+
40
38
cd gh-pages
41
39
42
40
if git diff --quiet --exit-code; then
Original file line number Diff line number Diff line change 2
2
3
3
set -e -x
4
4
5
-
6
5
if [ -z " ${TRAVIS_TAG} " ]; then
7
6
# Not a release
8
7
exit 0
@@ -51,5 +50,3 @@ for distfile in "${expected_wheels[@]}"; do
51
50
done
52
51
53
52
python -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:
152
152
- .ci/travis-build-wheels.sh
153
153
154
154
deploy :
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