language: nodejs

nodejs:
  - "10.16.1"

cache:
  directories:
  - node_modules # 缓存npm包 

before_script: 
  - npm install vuepress -g
  - npm install
  
script:
  - npm run build

after_script:
  - cd ./docs/.vuepress/dist
  - git init
  - git config user.name "drinkeewu"
  - git config user.email "773119690@qq.com"
  - git add .
  - git commit -m "auto deploy"
  - git push --force --quiet "https://${charts_token}@${GH_REF}" master:gh-pages


branches:
  only:
    - master # 触发集成分支

env:
  global:
    - GH_REF: github.com/drinkeewu/dr-vue-echarts.git