Skip to content

Commit

Permalink
add ci config
Browse files Browse the repository at this point in the history
mayswind committed Jul 10, 2016
1 parent 46140cb commit d3583b3
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
@@ -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:
14 changes: 14 additions & 0 deletions scripts/publish_dailybuild.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d3583b3

Please sign in to comment.