Skip to content

Commit

Permalink
Deploy only on staging-speakerfight.com
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfonceca committed Oct 11, 2017
1 parent 88e44f4 commit fea41b9
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,28 @@ general:
artifacts:
- 'coverage'
deployment:
# production:
# branch: master
# commands:
# - fab deploy
production:
branch: master
commands:
- fab deploy
- |
cat >~/.netrc <<EOF
machine api.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
machine git.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
EOF
- chmod 600 ~/.netrc # Heroku cli complains about permissions without this
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
- heroku maintenance:on --app staging-speakerfight
- heroku scale web=0 --app staging-speakerfight
- git push git@heroku.com:staging-speakerfight.git $CIRCLE_SHA1:refs/heads/master
- heroku run python manage.py migrate --app staging-speakerfight
- heroku run python manage.py compilemessages --app staging-speakerfight
- heroku scale web=1 --app staging-speakerfight
- heroku maintenance:off --app staging-speakerfight

0 comments on commit fea41b9

Please sign in to comment.