File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : node_js
22node_js :
33 - " 4"
4+ after_script :
5+ - scripts/travis-gh-pages
Original file line number Diff line number Diff line change 2525 "devDependencies" : {
2626 "ajv" : " ^3.6.2" ,
2727 "dot" : " ^1.0.3" ,
28+ "gh-pages-generator" : " ^0.2.2" ,
2829 "json-schema-test" : " ^1.2.1" ,
2930 "mocha" : " ^2.2.5" ,
3031 "pre-commit" : " ^1.1.2"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ if [[ " $TRAVIS_BRANCH " == " master" && " $TRAVIS_PULL_REQUEST " == " false" ]]; then
6+ git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE ' \.md$|\.json$|^LICENSE$' && {
7+ rm -rf ../gh-pages
8+ git clone -b gh-pages --single-branch https://${GITHUB_TOKEN} @github.com/epoberezkin/ajv.git ../gh-pages
9+ mkdir -p ../gh-pages/_source
10+ cp * .md ../gh-pages/_source
11+ cp LICENSE ../gh-pages/_source
12+ currentDir=$( pwd)
13+ cd ../gh-pages
14+ $currentDir /node_modules/.bin/gh-pages-generator
15+ git config user.email " $GIT_USER_EMAIL "
16+ git config user.name " $GIT_USER_NAME "
17+ git add .
18+ git commit -am " updated by travis build #$TRAVIS_BUILD_NUMBER "
19+ git push --quiet origin gh-pages > /dev/null 2>&1
20+ }
21+ fi
You can’t perform that action at this time.
0 commit comments