language: node_js node_js: - 10 branches: only: - master cache: directories: - node_modules before_install: - export TZ='Asia/Xiamen' install: - npm install script: - npm run demo - npm run build after_success: - npm run test jobs: include: - stage: "gh-page" script: npm run demo deploy: provider: pages skip_cleanup: true keep_history: true github_token: $GITHUB_TOKEN local_dir: ./dist/ target_branch: gh-pages verbose: true on: branch: master - stage: npm release node_js: "10" script: npm run build deploy: provider: npm email: "$EMAIL" api_key: "$NPM_TOKEN" skip_cleanup: true on: branch: master