forked from PaddlePaddle/VisualDL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_docs_on_travis.sh
More file actions
executable file
·25 lines (22 loc) · 944 Bytes
/
deploy_docs_on_travis.sh
File metadata and controls
executable file
·25 lines (22 loc) · 944 Bytes
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
#!/usr/bin/env bash
exit_code=0
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit $exit_code; fi;
if [ "$TRAVIS_BRANCH" == "develop_doc" ]; then
PPO_SCRIPT_BRANCH=develop
elif [[ "$TRAVIS_BRANCH" == "develop" ]]; then
PPO_SCRIPT_BRANCH=master
else
exit $exit_code;
fi
export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/$PPO_SCRIPT_BRANCH/scripts/deploy/deploy_docs.sh
docker run -it \
-e CONTENT_DEC_PASSWD=$CONTENT_DEC_PASSWD \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e DEPLOY_DOCS_SH=$DEPLOY_DOCS_SH \
-e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST \
-e PPO_SCRIPT_BRANCH=$PPO_SCRIPT_BRANCH \
-e PADDLE_ROOT=/VisualDL \
-v "$PWD:/VisualDL" \
-w /VisualDL \
paddlepaddle/paddle:latest-dev \
/bin/bash -c 'curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH /VisualDL /VisualDL/build/doc/ $PPO_SCRIPT_BRANCH' || exit_code=$(( exit_code | $? ))