language: ruby

addons:
  apt:
    packages:
      - libcurl4-openssl-dev

cache: bundler

before_install:
  - "echo 'gem: --no-document' > ~/.gemrc"
  - gem update --system
  - gem install bundler

script:
  - if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then bundle exec rake; fi
  - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then bundle exec thor updates:check --github-token $GH_TOKEN --upload; fi

deploy:
  provider: heroku
  app: devdocs
  on:
    branch: master
    condition: $TRAVIS_EVENT_TYPE != cron
  api_key:
    secure: NFfTIdMdNzm99u2bMq/iNo6Sl05XOcHvNEDrEpHvCWG79V1aTN53+sHww+PeTX1wgJA6ZrBAOyTduPlTZbmWH1iHkUhX2vagM1q680rJWkXccO42rJ1V0coKXIfN3/XYzim07YTT4PBdrDoBRd0NJN/fGXl6uNwBBX+7hHt5O4s=
