branches:
  only:
    - gh-pages
    - /.*/
language: node_js
node_js:
  - "node"
  - "8"
  - "6"
  - "4"
addons:
  chrome: stable
sudo: required
before_script:
  - node_modules/gulp/bin/gulp.js startServer &
  - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 &
jobs:
  include:
    - stage: test
      script: node_modules/gulp/bin/gulp.js
    - stage: deploy
      node_js: "8"
      script: node_modules/gulp/bin/gulp.js onlyDeploy
stages:
  - test
  - name: deploy
    if: branch = master

branches:
  only:
    - gh-pages
    - /.*/
language: node_js
node_js:
  - "node"
  - "8"
  - "6"
  - "4"
addons:
  chrome: stable
sudo: required
before_script:
  - node_modules/gulp/bin/gulp.js startServer &
  - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 &
script: node_modules/gulp/bin/gulp.js
deploy:
  provider: pages
  skip-cleanup: true
  github-token: $GITHUB_TOKEN
  keep-history: true
  on:
    branch: master

Use Travis CI to deploy to GitHub Pages
Use Travis CI to deploy to GitHub Pages
