diff --git a/.travis.yml b/.travis.yml index f4b4ee8cf6..14b861d6cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ script: - npm run test:travis - git config user.name "Travis CI" - git config user.email "sebastien.jourdain@kitware.com" + - 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 diff --git a/documentation/cli/pvw-doc.js b/documentation/cli/pvw-doc.js index c42b600e27..ddf87cf18d 100755 --- a/documentation/cli/pvw-doc.js +++ b/documentation/cli/pvw-doc.js @@ -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);