add ci config

This commit is contained in:
MaysWind 2016-07-10 19:02:25 +08:00
parent 46140cb829
commit d3583b302a
2 changed files with 16 additions and 1 deletions

View file

@ -8,12 +8,13 @@ dependencies:
- npm install -g bower
- npm install -g gulp
- bower install
- gulp clean build
deployment:
daily_build:
branch: master
commands:
- gulp clean build
- bash ./scripts/publish_dailybuild.sh
general:
branches:

View file

@ -0,0 +1,14 @@
if [ $CI == "true" ] && [ $CIRCLE_BRANCH == "master" ]; then
cp dist $CIRCLE_ARTIFACTS/ -r;
git checkout -b gh-pages remotes/origin/gh-pages;
rm -rf css;
rm -rf fonts;
rm -rf js;
rm -rf langs;
rm -rf imgs;
rm -rf views;
rm -f index.html;
cp $CIRCLE_ARTIFACTS/dist/* ./ -r;
git commit -a -m "daily build #$CIRCLE_SHA1" --author="CI <i@mayswind.net>";
git push origin gh-pages;
fi