File tree Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,6 @@ script:
27
27
# 43min timeout
28
28
paddle/scripts/paddle_docker_build.sh ${JOB}
29
29
if [ $? -eq 0 ] || [ $? -eq 142 ]; then true; else exit 1; fi;
30
- - |
31
- if [[ "$JOB" != "doc" ]]; then exit 0; fi;
32
- # For document only
33
- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;
34
- if [[ "$TRAVIS_BRANCH" != "develop" && ! "$TRAVIS_BRANCH" =~ ^v|release/[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?(-\S*)?$ ]]; then exit 0; fi;
35
- export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
36
- export DOCS_DIR=`pwd`
37
- cd ..
38
- curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR $DOCS_DIR/build/doc/
39
30
notifications :
40
31
email :
41
32
on_success : change
Original file line number Diff line number Diff line change 419
419
linkchecker doc/v2/en/html/index.html
420
420
linkchecker doc/v2/cn/html/index.html
421
421
linkchecker doc/v2/api/en/html/index.html
422
+
423
+ if [[ " $TRAVIS_PULL_REQUEST " != " false" ]]; then exit 0; fi ;
424
+
425
+ # Deploy to the the content server if its a "develop" or "release/version" branch
426
+ # The "develop_doc" branch is reserved to test full deploy process without impacting the real content.
427
+ if [ " $TRAVIS_BRANCH " == " develop_doc" ]; then
428
+ PPO_SCRIPT_BRANCH=develop
429
+ elif [[ " $TRAVIS_BRANCH " == " develop" || " $TRAVIS_BRANCH " =~ ^v| release/[[:digit:]]+\. [[:digit:]]+ (\. [[:digit:]]+)? (-\S * )? $ ]]; then
430
+ PPO_SCRIPT_BRANCH=master
431
+ else
432
+ # Early exit, this branch doesn't require documentation build
433
+ return 0;
434
+ fi
435
+ # Fetch the paddlepaddle.org deploy_docs.sh from the appopriate branch
436
+ export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/$PPO_SCRIPT_BRANCH /scripts/deploy/deploy_docs.sh
437
+ export PYTHONPATH=$PYTHONPATH :${PADDLE_ROOT} /build/python:/paddle/build/python
438
+ cd ..
439
+ curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH ${PADDLE_ROOT} ${PADDLE_ROOT} /build/doc/ ${PPO_SCRIPT_BRANCH}
440
+ cd -
422
441
}
423
442
424
443
function gen_html() {
Original file line number Diff line number Diff line change 52
52
${DOCKER_CMD} run -it \
53
53
${DOCKER_ENV} \
54
54
-e SCRIPT_NAME=$0 \
55
+ -e CONTENT_DEC_PASSWD=$CONTENT_DEC_PASSWD \
56
+ -e TRAVIS_BRANCH=$TRAVIS_BRANCH \
57
+ -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST \
55
58
-v $PADDLE_ROOT :/paddle \
56
59
-v ${HOME} /.ccache:/root/.ccache \
57
60
-w /paddle \
You can’t perform that action at this time.
0 commit comments