Skip to content

Instantly share code, notes, and snippets.

@xb4dc0d3
Created March 9, 2020 14:41
Show Gist options
  • Save xb4dc0d3/88969506f191b4e51dee748a6222b85a to your computer and use it in GitHub Desktop.
Save xb4dc0d3/88969506f191b4e51dee748a6222b85a to your computer and use it in GitHub Desktop.
backend-deploy:
image: ruby:2.4
stage: deploy
only:
- staging
before_script:
- gem install dpl
- wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
script:
- dpl --provider=heroku --app=$HEROKU_APPNAME --api-key=$HEROKU_APIKEY
- export HEROKU_API_KEY=$HEROKU_APIKEY
- echo "SECRET_KEY=$SECRET_KEY_DJANGO" > .env.staging
- heroku run --app $HEROKU_APPNAME migrate
environment:
name: staging
url: $HEROKU_APP_HOST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment