File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,14 @@ node_js:
6
6
- stable
7
7
script :
8
8
- npm test
9
+ - npm run doc
9
10
after_success :
10
11
- npm run coveralls
12
+ - jsdoc/publish.sh
11
13
before_install :
12
- - ' [ "${TRAVIS_PULL_REQUEST}" = "false" ] && openssl aes-256-cbc -K $encrypted_cb4d3d070e32_key -iv $encrypted_cb4d3d070e32_iv -in auth.js.enc -out test/resources/auth.js -d || true'
14
+ - ' [ "${TRAVIS_PULL_REQUEST}" = "false" ] && openssl aes-256-cbc -K $encrypted_cb4d3d070e32_key
15
+ -iv $encrypted_cb4d3d070e32_iv -in auth.js.enc -out test/resources/auth.js -d ||
16
+ true'
17
+ env :
18
+ global :
19
+ secure : I50FnfubwiZlol5Qs9tXPVACGbs+SG2dJLjpbzeio0Hl666d/hDuvf7IFwqqaRjQkmK2TdIjaGLMOgHxh/GGAoYf7LfZqjDID/tAhgoFOYiZwiPj66Z82F9P9cega2nkNW+125NzPuU3rhSCByG8+K/PMH/5JxPwPMoAYNLQjWc=
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # based on http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/
4
+ # todo: add && [ "$TRAVIS_TAG" != "" ] after confirming it works otherwise
5
+
6
+ if [ " $TRAVIS_REPO_SLUG " == " watson-developer-cloud/node-sdk" ] && [ " $TRAVIS_PULL_REQUEST " == " false" ] && [ " $TRAVIS_BRANCH " == " master" ] && [ " $TRAVIS_TAG " ]; then
7
+
8
+ echo " Publishing JSDoc..."
9
+
10
+ git config --global user.email
" [email protected] "
11
+ git config --global user.name " travis-ci"
12
+ git clone --quiet --branch=gh-pages https://${GH_TOKEN} @github.com/watson-developer-cloud/node-sdk gh-pages > /dev/null
13
+
14
+ pushd gh-pages
15
+ cp -Rf ../doc/watson-developer-cloud/* ./
16
+ git add -f .
17
+ git commit -m " JSDdoc for $TRAVIS_TAG "
18
+ git push -fq origin gh-pages > /dev/null
19
+ popd
20
+
21
+ echo -e " Published JSDoc for $TRAVIS_TAG to gh-pages.\n"
22
+
23
+ else
24
+
25
+ echo -e " Not publishing docs for tag $TRAVIS_TAG on branch $TRAVIS_BRANCH of repo $TRAVIS_REPO_SLUG "
26
+
27
+ fi
You can’t perform that action at this time.
0 commit comments