diff --git a/circle.yml b/circle.yml index 60d75cf33d..059964c447 100644 --- a/circle.yml +++ b/circle.yml @@ -2,6 +2,9 @@ general: branches: ignore: - ins_n_outs +dependencies: + cache_directories: + - "~/ionic-site" # cache ionic-site machine: node: version: 4.1.0 diff --git a/scripts/ci/deploy.sh b/scripts/ci/deploy.sh index 5cfa54fe25..67a7b8b1f1 100755 --- a/scripts/ci/deploy.sh +++ b/scripts/ci/deploy.sh @@ -28,7 +28,7 @@ function run { fi # Install gulp globally for site deploy script. - npm install -g gulp + # npm install -g gulp if [[ "$IS_RELEASE" == "true" ]]; then echo "RELEASE DETECTED!" diff --git a/scripts/docs/deploy.sh b/scripts/docs/deploy.sh index f3ef689d28..a8c2a41fc6 100755 --- a/scripts/docs/deploy.sh +++ b/scripts/docs/deploy.sh @@ -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