diff --git a/.travis.yml b/.travis.yml index 999472a095ea..53dbd79f0fb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,21 +7,24 @@ branches: - master env: global: - - secure: "B1vanjI2TMf+YnmbcF5HWAMNnmT+CFr2EB1CCIcyoWqs2RIBvgiDH0gDR46iUDdfPRSt3Eokaru1fY8ptZDRnrt3oKokWp4ZrRO0x7uUGbkGfdmHHxnOlUA1m9rVhaOBCWl5opfaA8ncWcXwdWZGg7HWpS7EfTNr2dIr7lAC2mU=" + - secure: "a9Qx7y7dIWXEdppdmPW5g6CJQpUWUmd3sKWcJPKMfcg+xVHEBhPl9PCt/2jGK1sxstTDiwrVaV1NKpG4qD03UVot2zX28o1mM7JY6rDAl709rvKveegDeC9vo+U/BWid3lq/Impl37X0YYGY+spEcptI6bnvWxa6d7MGPCx3L2c=" - GH_OWNER: GoogleCloudPlatform - GH_PROJECT_NAME: gcloud-node script: - npm run lint - npm run test after_success: + - git submodule add -b master-copy https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} master > /dev/null 2>&1 + - cd master + - npm run docs - git submodule add -b gh-pages https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} site > /dev/null 2>&1 - cd site - - if git checkout gh-pages; then git checkout -b gh-pages; fi + - git checkout -b gh-pages - git rm -r . - cp -R ../docs/* . - cp ../docs/.* . - git add -f . - git config user.email "sawchuk@gmail.com" - git config user.name "stephenplusplus" - - git commit -am "building gh-pages [ci skip]" + - git commit -am "build gh-pages from master. [ci skip]" - git push https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:gh-pages > /dev/null 2>&1