diff --git a/circle.yml b/circle.yml index d007caa6a..166686e1f 100644 --- a/circle.yml +++ b/circle.yml @@ -9,19 +9,19 @@ general: only: - master # ignore PRs and branches -#dependencies: -# pre: -# - ./scripts/docs/prepare.sh -# cache_directories: -# - "~/ionic-site" # cache ionic-site +dependencies: + pre: + - ./scripts/docs/prepare.sh + cache_directories: + - "~/ionic-site" # cache ionic-site test: override: - echo "No tests are written at the moment. But we will attempt to build the library with the latest changes." - npm run build_bundle -#deployment: -# staging: -# branch: master -# commands: -# - ./scripts/docs/update_docs.sh +deployment: + staging: + branch: master + commands: + - ./scripts/docs/update_docs.sh diff --git a/scripts/docs/prepare.sh b/scripts/docs/prepare.sh index 5300127af..084f36796 100755 --- a/scripts/docs/prepare.sh +++ b/scripts/docs/prepare.sh @@ -14,7 +14,10 @@ function init { } function run { - + # no need to run on PRs + if [ -z $CI_PULL_REQUEST ] then + exit 0 + fi if [ ! -d "$SITE_DIR" ]; then echo "checking out" cd ./scripts diff --git a/scripts/docs/update_docs.sh b/scripts/docs/update_docs.sh index d765238b4..413b3a0f3 100755 --- a/scripts/docs/update_docs.sh +++ b/scripts/docs/update_docs.sh @@ -30,8 +30,6 @@ function run { echo "-- No changes detected for the following commit, docs not updated." echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1" else - git config --global user.email "hi@ionicframework.com" - git config --global user.name "Ionitron" git add -A git commit -am "Automated build of native docs driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1" git push origin master diff --git a/scripts/git/clone.sh b/scripts/git/clone.sh index dd29fe56a..d4e2d7b97 100755 --- a/scripts/git/clone.sh +++ b/scripts/git/clone.sh @@ -17,7 +17,11 @@ function run { if [[ "$DEPTH" != "" ]]; then ARGS="$ARGS --depth=$DEPTH" fi - git clone https://driftyco:$GH_TOKEN@github.com/$REPOSITORY $DIRECTORY $ARGS + + git config --global user.email "hi@ionicframework.com" + git config --global user.name "Ionitron" + + git clone git@github.com:driftyco/$REPOSITORY.git $DIRECTORY $ARGS cd $DIRECTORY git fetch origin --tags cd ../