From 8a8d3663d63b7adec16cea5001477faa1fd6ffdd Mon Sep 17 00:00:00 2001 From: Etienne Ischer Date: Sat, 24 Apr 2021 19:40:36 +0200 Subject: [PATCH] add auto migrate in the CI --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5aed41a..10cd562 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 \ No newline at end of file + - master