Deploys project with CircleCI

This commit is contained in:
Samuel Ryan 2015-11-06 22:01:43 +00:00
parent 8ba438311e
commit df66eea663
2 changed files with 21 additions and 0 deletions

14
circle.yml Normal file
View File

@ -0,0 +1,14 @@
machine:
node:
version: 4.1.0
dependencies:
post:
- bower install
- node build
deployment:
production:
branch: metalsmith
commands:
- ./deploy.sh

7
deploy.sh Normal file
View File

@ -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"