push gh-pages from travis if docs change
parent
32f38252fb
commit
a476db79eb
|
@ -10,3 +10,4 @@ node_js:
|
|||
after_script:
|
||||
- codeclimate-test-reporter < coverage/lcov.info
|
||||
- coveralls < coverage/lcov.info
|
||||
- scripts/travis-gh-pages
|
||||
|
|
|
@ -17,8 +17,8 @@ Possible type coercions:
|
|||
|---|:-:|:-:|:-:|:-:|
|
||||
|string |-|`x`→`""+x`|`false`→`"false"`<br>`true`→`"true"`|`null`→`""`|
|
||||
|number /<br>integer|Valid number /<br>integer: `x`→`+x`<br>|-|`false`→`0`<br>`true`→`1`|`null`→`0`|
|
||||
|boolean |`"false"`→`false`<br>`"true"`→`true`<br>`"abc"`↛<br>`""`↛|`0`→`false`<br>`1`→`true`<br>`x`↛|-|`null`→`false`|
|
||||
|null |`""`→`null`<br>`"null"`↛<br>`"abc"`↛|`0`→`null`<br>`x`↛|`false`→`null`<br>`true`↛|-|
|
||||
|boolean |`"false"`→`false`<br>`"true"`→`true`<br>`"abc"`⇸<br>`""`⇸|`0`→`false`<br>`1`→`true`<br>`x`⇸|-|`null`→`false`|
|
||||
|null |`""`→`null`<br>`"null"`⇸<br>`"abc"`⇸|`0`→`null`<br>`x`⇸|`false`→`null`<br>`true`⇸|-|
|
||||
|
||||
|
||||
## Coersion from string values
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# ajv - Another JSON Schema Validator
|
||||
# Ajv: Another JSON Schema Validator
|
||||
|
||||
Currently the fastest JSON Schema validator for node.js and browser.
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
|
||||
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$' && {
|
||||
rm -rf ../gh-pages
|
||||
git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages
|
||||
cp *.md ../gh-pages/_source
|
||||
cp LICENSE ../gh-pages/_source
|
||||
cd ../gh-pages
|
||||
./generate
|
||||
git add .
|
||||
git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER"
|
||||
git push origin gh-pages
|
||||
}
|
||||
fi
|
Loading…
Reference in New Issue