# https://travis-ci.org/HearthSim/Sunwell
sudo: false
language: node_js
node_js:
  - "7"
  - "8"

cache:
  yarn: true

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-6
      - libgif-dev

env:
  - CXX=g++-6

script:
  - yarn run build
  - NODE_ENV=production yarn run build
  - yarn run qa

notifications:
  email:
    on_failure: always
    on_success: change
  irc:
    channels:
      - "chat.freenode.net#hearthsim-commits"
    use_notice: true
    skip_join: true
    on_failure: always
    on_success: change
    template:
      - "(%{branch} @ %{commit} : %{author}): %{message} %{build_url}"

# https://travis-ci.org/HearthSim/Sunwell
sudo: false
language: node_js
node_js:
  - "7"
  - "8"

cache:
  - yarn
  - pip

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-6
      - libgif-dev

env:
  - CXX=g++-6

jobs:
  include:
    - stage: deploy
      if: branch = master AND type = push
      node_js: 8
      install:
      - npm install yarn
      - yarn --pure-lockfile
      - pip install --user awscli
      script:
      - yarn run build
      - NODE_ENV=production yarn run build
      - cp -r assets/ dist/
      - aws s3 sync --delete dist/ s3://$S3_DEFAULT_BUCKET/branches/$TRAVIS_BRANCH/

script:
  - yarn run build
  - NODE_ENV=production yarn run build
  - yarn run qa

notifications:
  email:
    on_failure: always
    on_success: change
  irc:
    channels:
      - "chat.freenode.net#hearthsim-commits"
    use_notice: true
    skip_join: true
    on_failure: always
    on_success: change
    template:
      - "(%{branch} @ %{commit} : %{author}): %{message} %{build_url}"

Add automatic deployment to sunwell.hearthsim.net
Add automatic deployment to sunwell.hearthsim.net
