add auto migrate in the CI

This commit is contained in:
2021-04-24 19:40:36 +02:00
parent 33bcf7195c
commit 8a8d3663d6

View File

@@ -1,15 +1,17 @@
before_script:
- apt-get update -qy
- apt-get install -y ruby
- apt-get install -y ruby git
- gem install dpl
- curl https://cli-assets.heroku.com/install.sh | sh
stages:
- deploy
deploy:
deploy_production:
stage: deploy
image: ruby:latest
script:
- dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY
- heroku run bundle exec rails db:migrate --exit-code --app $HEROKU_APP_PRODUCTION
only:
- master