From df66eea6636779abcdcf9f5f4429961b8c41353d Mon Sep 17 00:00:00 2001 From: Samuel Ryan Date: Fri, 6 Nov 2015 22:01:43 +0000 Subject: [PATCH] Deploys project with CircleCI --- circle.yml | 14 ++++++++++++++ deploy.sh | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 circle.yml create mode 100644 deploy.sh diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..a8a06b4 --- /dev/null +++ b/circle.yml @@ -0,0 +1,14 @@ +machine: + node: + version: 4.1.0 + +dependencies: + post: + - bower install + - node build + +deployment: + production: + branch: metalsmith + commands: + - ./deploy.sh \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..92749dd --- /dev/null +++ b/deploy.sh @@ -0,0 +1,7 @@ +build="build-${CIRCLE_BUILD_NUM}" +sudo mkdir ~/${build} +sudo cp -R ~/httpstatus.es/build/. ~/${build} +echo "Deploying ${build} to ${DEPLOY_TARGET}" +rsync -r -l ~/${build} ${DEPLOY_TARGET}:/srv/www/httpstatus.es +ssh ${DEPLOY_TARGET} "ln -sfn /srv/www/httpstatus.es/${build} /srv/www/httpstatus.es/live" +echo "Build deployed and pushed live" \ No newline at end of file