Skip to content

Commit

Permalink
fix(Travis): Try to make travis push web site correctly with all git …
Browse files Browse the repository at this point in the history
…credential
  • Loading branch information
jourdain committed Feb 18, 2016
1 parent cad447c commit 595b76f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ script:
- npm run test:travis
- git config user.name "Travis CI"
- git config user.email "[email protected]"
- export GIT_PUBLISH_URL=https://${GH_TOKEN}@github.com/Kitware/paraviewweb.git
- if [ "$TRAVIS_BRANCH" == "master" ]; then npm run doc:publish; fi
after_success:
- npm run semantic-release
Expand Down
8 changes: 7 additions & 1 deletion documentation/cli/pvw-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,14 @@ function doneWithProcessing() {

if(program.publish) {
console.log('\n=> Publish', publishBaseURL, '\n');
var options = {};

require('gh-pages').publish(rootWWW, function(err) {
if(process.env.GIT_PUBLISH_URL) {
console.log('Got custom URL', process.env.GIT_PUBLISH_URL);
options.repo = process.env.GIT_PUBLISH_URL;
}

require('gh-pages').publish(rootWWW, options, function(err) {
if(err) {
console.log('Error while publishing');
console.log(err);
Expand Down

0 comments on commit 595b76f

Please sign in to comment.