dist: trusty
sudo: false

language: node_js
node_js:
  - v8
  - v9

cache:
  directories:
  - "$HOME/.npm"

env:
- DEBUG=tape-spawn SHARP_IGNORE_GLOBAL_LIBVIPS=1

matrix:
  allow_failures:
    - node_js: v9

before_install:
- npm i -g npm@latest

install:
- npm ci
- npm run install:all

before_deploy:
- git-lfs pull
- make clean build-html

deploy:
  - provider: pages
    skip_cleanup: true
    github-token: "$GH_TOKEN"
    local-dir: dist
    on:
      branch: master
      node_js: v8
  - provider: npm
    skip_cleanup: true
    on:
      tags: true
    email: "hi@oncletom.io"
    api_key: "$NPM_TOKEN"
