You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/scripts/deploy-to-gh-pages.sh

32 lines
758 B

7 years ago
#!/bin/bash
set -e # exit with nonzero exit code if anything fails
6 years ago
BUMP="bump "
SITE="update site"
if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_COMMIT_MESSAGE == *$BUMP* || $TRAVIS_COMMIT_MESSAGE == $SITE ]]; then
7 years ago
echo "Starting to update gh-pages\n"
7 years ago
rm -rf site-dist
mkdir site-dist
7 years ago
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis"
7 years ago
npm run site
7 years ago
7 years ago
cd site-dist
7 years ago
git init
git add -f .
git commit -m "Travis build"
git push --force --quiet "https://${GITHUB_TOKEN}@github.com/vueComponent/ant-design-vue.git" master:gh-pages > /dev/null
7 years ago
echo "Done updating gh-pages\n"
else
echo "Skipped updating gh-pages, because build is not triggered from the master branch."
fi;