language: node_js

matrix:
  include:
    - os: linux
      dist: trusty
      sudo: false
      node_js: "6"
      env: DEPLOY=true
    - os: osx
      node_js: "6"

env:
  global:
    - DEBUG=zyre*

script:
  - travis_retry npm run coverage

after_success:
  - if [[ $DEPLOY == true ]]; then npm run build:docs; bash <(curl -s https://codecov.io/bash); fi

deploy:
  provider: pages
  skip_cleanup: true
  local_dir: docs
  github_token: $GITHUB_TOKEN
  on:
    branch: master
    condition: $DEPLOY = true

language: node_js

matrix:
  include:
    - os: linux
      dist: trusty
      sudo: false
      node_js: "6"
    - os: osx
      node_js: "6"

env:
  global:
    - DEBUG=zyre*

script:
  - travis_retry npm run coverage

after_success:
  - if [[ $TRAVIS_OS_NAME == "linux" ]]; then bash <(curl -s https://codecov.io/bash); fi
  - if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == false ]]; then npm run build:docs; fi

deploy:
  provider: pages
  skip_cleanup: true
  local_dir: docs
  github_token: $GITHUB_TOKEN
  on:
    branch: master
    condition: $TRAVIS_OS_NAME = "linux"

Fix deployment conditions of the Travis-CI job
Fix deployment conditions of the Travis-CI job
