add auto migrate in the CI
This commit is contained in:
@@ -1,15 +1,17 @@
|
|||||||
before_script:
|
before_script:
|
||||||
- apt-get update -qy
|
- apt-get update -qy
|
||||||
- apt-get install -y ruby
|
- apt-get install -y ruby git
|
||||||
- gem install dpl
|
- gem install dpl
|
||||||
|
- curl https://cli-assets.heroku.com/install.sh | sh
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
deploy:
|
deploy_production:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: ruby:latest
|
image: ruby:latest
|
||||||
script:
|
script:
|
||||||
- dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY
|
- 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:
|
only:
|
||||||
- master
|
- master
|
||||||
Reference in New Issue
Block a user