File tree 3 files changed +24
-0
lines changed
3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
3
- " 4"
4
+ after_script :
5
+ - scripts/travis-gh-pages
Original file line number Diff line number Diff line change 25
25
"devDependencies" : {
26
26
"ajv" : " ^3.6.2" ,
27
27
"dot" : " ^1.0.3" ,
28
+ "gh-pages-generator" : " ^0.2.2" ,
28
29
"json-schema-test" : " ^1.2.1" ,
29
30
"mocha" : " ^2.2.5" ,
30
31
"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