ajv/scripts/travis-gh-pages

21 lines
747 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2016-03-30 03:08:17 +03:00
set -e
2016-03-30 02:33:07 +03:00
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; 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
mkdir -p ../gh-pages/_source
cp *.md ../gh-pages/_source
cp LICENSE ../gh-pages/_source
cd ../gh-pages
2016-04-16 16:12:33 +03:00
./node_modules/.bin/gh-pages-generator
2016-03-30 03:16:48 +03:00
git config user.email "e.poberezkin@me.com"
git config user.name "Evgeny Poberezkin"
git add .
git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER"
git push --quiet origin gh-pages > /dev/null 2>&1
}
fi