language: node_js
node_js:
  - 12
cache:
  directories:
    - node_modules

after_success:
  - git config --global user.name "thuhole"
  - git config --global user.email "thuhole@users.noreply.github.com"
  - git remote rm origin
  - git remote add origin https://thuhole:${GH_TOKEN}@github.com/thuhole/webhole.git
  - CI=false REACT_APP_BUILD_INFO=$(printf "Travis%s" "$(TZ=Asia/Shanghai date +"%y%m%d%H%M%S")") npm run deploy
