Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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