sudo: required
language: ruby
dist: bionic
branches:
  only:
    - mainline
    - dev
cache:
  bundler: true
  yarn: true
  directories:
    - tmp/cache/assets/test/sprockets
env:
  global:
    - secure: "Z5TpM2jEX4UCvNePnk/LwltQX48U2u9BRc+Iypr1x9QW2o228QJhPIOH39a8RMUrepGnkQIq9q3ZRUn98RfrJz1yThtlNFL3NmzdQ57gKgjGwfpa0e4Dwj/ZJqV2D84tDGjvdVYLP7zzaYZxQcwk/cgNpzKf/jq97HLNP7CYuf4="
before_deploy:
  - bundle exec script/heroku_maintenance.rb on
deploy:
  provider: heroku
  api_key:
    secure: "WrQxf0fEKkCdXrjcejurobOnNNz3he4dDwjBbToXbQTQNDObPp7NetJrLsfM8FiUFEeOuvhIHHiDQtMvY720zGGAGxDptvgFS+0QHCUqoTRZA/yFfUmHlG2jROXTzk5uVK0AE4k6Ion5kX8+mM0EnMT/7u+MTFiukrJctSiEXfg="
  on:
    repo: Growstuff/growstuff
  app:
    dev: growstuff-staging
    mainline: growstuff-prod
  run:
    - "script/deploy-tasks.sh"
    - restart
after_deploy:
  - bundle exec script/heroku_maintenance.rb off
