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 @@ -40,13 +40,15 @@ install:
4040
4141script : if [[ -z "$ELECTRON" ]]; then travis_retry npm test; else travis_retry npm run test:electron; fi
4242
43+ after_sucess :
44+ - bash ./scripts/publish_docs.sh
45+
4346deploy :
4447 provider : script
4548 skip_cleanup : true
4649 # Linking to prebuild directly since it doesn't work inside a npm script.
4750 script :
4851 - node_modules/prebuild/bin.js --all -u $GH_TOKEN
49- - bash ./travis_publish_docs.sh
5052 on :
5153 condition : " $DEPLOY = true"
5254 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