language: node_js
node_js:
  - 10
  - v9
  - v8
  - v7
  - v6
cache:
  yarn: false
  directories:
    - node_modules
install:
  - npm install i2c-bus --ignore-scripts
  - npm install
env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_script:
  - npm prune
after_success:
  - npm run report-coverage
  - npm run build
  - npm run build-docs
deploy:
  - provider: script
    skip_cleanup: true
    script:
      - npx travis-deploy-once "npx semantic-release"
  - provider: pages
    skip_cleanup: true
    github_token: $GH_TOKEN # Set in travis-ci.org dashboard
    local_dir: docs/motor-hat/1.0.0-semanticrelease
    on:
      branch: master

language: node_js
node_js:
  - 10
  - v9
  - v8
  - v7
  - v6
cache:
  yarn: false
  directories:
    - node_modules
install:
  - npm install i2c-bus --ignore-scripts
  - npm install
env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_script:
  - npm prune
after_success:
  - npm run report-coverage
  - npm run build
  - npm run build-docs
jobs:
  include:
    - stage: npm release
      script: echo "Deploying to npm ..."
      deploy:
        provider: script
        skip_cleanup: true
        script:
          - npx travis-deploy-once "npx semantic-release"
        on:
          branch: master
    - stage: github pages release
      script: echo "Deploying to github pages ..."
      deploy:
        provider: pages
        skip_cleanup: true
        github_token: $GH_TOKEN # Set in travis-ci.org dashboard
        local_dir: docs/motor-hat/1.0.0-semanticrelease
        on:
          branch: master

Use build stages for deployment
fix(deployment): Use build stages for deployment