sudo: false
language: ruby

services:
  - docker

env:
  global:
    - DOCKER_REPOSITORY=$DOCKER_USERNAME/tutor

rvm:
  - 2.5

cache:
  bundler: true
  directories:
    - node_modules
  yarn: true

before_install:
  - gem update --system
  - gem --version
  - gem install bundler

install:
  - bundle install
  - nvm install node
  - node -v
  - npm i -g yarn bower
  - yarn

before_script:
  - bundle exec rake db:migrate RAILS_ENV=production
  - bundle exec rake db:migrate RAILS_ENV=test

before_deploy: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD

deploy:
  provider: script
  script: ./Dockerhub
  on:
    branch: master
Fix path to docker deploy script
Fix path to docker deploy script
