mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(CI): clear nightly dir before running dgeni to remove old dirs
also add caching of ionic-site limit ionic-site clone depth use local gulp in node_modules Closes #439
This commit is contained in:
@ -12,10 +12,21 @@ function init {
|
||||
cd ..
|
||||
SITE_PATH=$(readJsonProp "config.json" "sitePath")
|
||||
SITE_DIR=$IONIC_DIR/$SITE_PATH
|
||||
DOCS_DEST=$(readJsonProp "config.json" "docsDest")
|
||||
|
||||
./git/clone.sh --repository="driftyco/ionic-site" \
|
||||
--directory="$SITE_DIR" \
|
||||
--branch="master"
|
||||
if [ ! -d "$SITE_DIR" ]; then
|
||||
echo "checking out"
|
||||
./git/clone.sh --repository="driftyco/ionic-site" \
|
||||
--directory="$SITE_DIR" \
|
||||
--branch="master" \
|
||||
--depth=1
|
||||
else
|
||||
echo "using existing"
|
||||
cd $SITE_DIR
|
||||
git reset --hard
|
||||
git pull origin master
|
||||
cd $IONIC_DIR/scripts
|
||||
fi
|
||||
}
|
||||
|
||||
function run {
|
||||
@ -23,14 +34,15 @@ function run {
|
||||
VERSION=$(readJsonProp "package.json" "version")
|
||||
|
||||
#compile API Demos
|
||||
gulp demos --production=true
|
||||
./node_modules/.bin/gulp demos --production=true
|
||||
|
||||
# process new docs
|
||||
gulp docs --doc-version="$VERSION_NAME"
|
||||
rm -R $DOCS_DEST/api
|
||||
./node_modules/.bin/gulp docs --doc-version="$VERSION_NAME"
|
||||
|
||||
# compile sass vars json for ionic-site docs
|
||||
gulp docs.sass-variables
|
||||
cp tmp/sass.json $SITE_DIR/docs/v2/theming/overriding-ionic-variables/
|
||||
./node_modules/.bin/gulp docs.sass-variables
|
||||
cp tmp/sass.json $DOCS_DEST/theming/overriding-ionic-variables/
|
||||
|
||||
# CD in to the site dir to commit updated docs
|
||||
cd $SITE_DIR
|
||||
|
Reference in New Issue
Block a user