Created
February 1, 2017 18:03
-
-
Save drock/03eafc237d6b3e408ee75fe56700548b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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://[email protected]: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