Open zhaobinglong opened 4 years ago
// 在项目根目录下新建 .travis.yml文件,这是自动构建程序的配置文件
language: node_js
# nodejs版本
node_js:
- '6'
# Travis-CI Caching
cache:
directories:
- node_modules
# S: Build Lifecycle
install:
- npm install
before_script:
# 无其他依赖项所以执行npm run build 构建就行了
script:
- npm run build
after_script:
# - cd ./dist
# - git init
# - git config user.name "${U_NAME}"
# - git config user.email "${U_EMAIL}"
# - git add .
# - git commit -m "Update tools"
# - git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:${P_BRANCH}
# E: Build LifeCycle
#指定分支,只有指定的分支提交时才会运行脚本
branches:
only:
- master
env:
global:
# 我将其添加到了travis-ci的环境变量中
#- GH_REF: github.com/yimogit/metools.git
https://www.jianshu.com/p/4d7702ccf0aa https://www.jianshu.com/p/f2d3b30265c7 https://www.cnblogs.com/morang/p/7228488.html http://www.ruanyifeng.com/blog/2017/12/travis_ci_tutorial.html https://blog.csdn.net/u011350541/article/details/84034141 https://segmentfault.com/a/1190000011218410?_ea=5032568 https://zhuanlan.zhihu.com/p/25066056
git hook钩子自动部署