Skip to content

Instantly share code, notes, and snippets.

@davidguttman
Forked from drock/deis-circle.yaml
Created February 1, 2017 19:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save davidguttman/4d286192661335079e9343e5b080686c to your computer and use it in GitHub Desktop.
#Sample circle.yml for deploying a rails app to deis
machine:
pre:
# install the deis cli
- curl -sSL http://deis.io/deis-cli/install-v2.sh | bash
- sudo mv $PWD/deis /usr/local/bin/deis
deployment:
staging:
branch: master
commands:
# Setup the circleci deis user and password as ENV vars in the CircleCI project
- deis login http://deis.mycluser.net --username $DEIS_USER --password $DEIS_PASSWORD
# by default circle ci does shallow clones which can cause problems when pushing to an empty deis repo
- '[[ ! -s "$(git rev-parse --git-dir)/shallow" ]] || git fetch --unshallow'
- git push ssh://git@deis-builder.mycluster.net:2222/staging-app.git $CIRCLE_SHA1:refs/heads/master -f
- deis run rake db:migrate -a staging-app
- deis ps:restart -a staging-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment