diff --git a/.travis.yml b/.travis.yml index 730edbe..66ffacc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,21 @@ notifications: node_js: - '7' - '6' - - '4' before_script: - npm prune -after_success: - - npm run semantic-release +after_success: | + if [ -n "$GH_TOKEN" ]; then + cd "$TRAVIS_BUILD_DIR" + npm run build:docs + cd .build/docs + git init + git checkout -b gh-pages + git add . + git -c user.name='travis' -c user.email='travis' commit -m init + git push -f -q https://thzinc:$GH_TOKEN@github.com/syncromatics/syncromatics-track-api gh-pages &2>/dev/null + cd "$TRAVIS_BUILD_DIR" + fi + npm run semantic-release branches: except: - /^v\d+\.\d+\.\d+$/ diff --git a/package.json b/package.json index fca2d64..89c1838 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "scripts": { "serve:docs": "documentation serve -f html -w src/index.js", - "build:docs": "documentation build -f html -o build/docs src/index.js", + "build:docs": "documentation build -f html -o .build/docs src/index.js", "test:local": "karma start", "test": "karma start --single-run --fail-on-empty-test-suite", "prepublish": "webpack",