File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,15 @@ script: if [[ -z "$ELECTRON" ]]; then travis_retry npm run coverage; else travis
4343after_success :
4444 - ' if [[ $DEPLOY == true && $TRAVIS_OS_NAME == linux]]; then bash <(curl -s https://codecov.io/bash); fi'
4545
46+ after_sucess :
47+ - bash ./scripts/publish_docs.sh
48+
4649deploy :
4750 provider : script
4851 skip_cleanup : true
4952 # Linking to prebuild directly since it doesn't work inside a npm script.
5053 script :
5154 - node_modules/prebuild/bin.js --all -u $GH_TOKEN
52- - bash ./travis_publish_docs.sh
5355 on :
5456 condition : " $DEPLOY = true"
5557 tags : true
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == " master" && $DEPLOY == " true" ]]
3+ then
4+ npm run build:docs
25
3- npm run build:docs
6+ ( cd docs
7+ git init
8+ git config user.email " travis@travis-ci.com"
9+ git config user.name " Travis Bot"
410
5- ( cd docs
6- git init
7- git config user.email " travis@travis-ci.com"
8- git config user.name " Travis Bot"
9-
10- git add .
11- git commit -m " Publish docs from $TRAVIS_BUILD_NUMBER "
12- git push --force --quiet " https://${GH_TOKEN} @${GH_REF} " master:gh-pages > /dev/null 2>&1
13- echo " Documentation has been published!"
14- )
11+ git add .
12+ git commit -m " Publish docs from $TRAVIS_BUILD_NUMBER "
13+ git push --force --quiet " https://${GH_TOKEN} @${GH_REF} " master:gh-pages > /dev/null 2>&1
14+ echo " Documentation has been published!"
15+ )
16+ else
17+ echo " Documentation has not been published because not on master!"
18+ fi
You can’t perform that action at this time.
0 commit comments