add ci config
This commit is contained in:
parent
46140cb829
commit
d3583b302a
|
@ -8,12 +8,13 @@ dependencies:
|
||||||
- npm install -g bower
|
- npm install -g bower
|
||||||
- npm install -g gulp
|
- npm install -g gulp
|
||||||
- bower install
|
- bower install
|
||||||
|
- gulp clean build
|
||||||
|
|
||||||
deployment:
|
deployment:
|
||||||
daily_build:
|
daily_build:
|
||||||
branch: master
|
branch: master
|
||||||
commands:
|
commands:
|
||||||
- gulp clean build
|
- bash ./scripts/publish_dailybuild.sh
|
||||||
|
|
||||||
general:
|
general:
|
||||||
branches:
|
branches:
|
||||||
|
|
14
scripts/publish_dailybuild.sh
Normal file
14
scripts/publish_dailybuild.sh
Normal 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
|
Reference in a new issue