使用Travis自动将github issue转换成blog并发布
原因
使用
实现
- Travis相关配置,参考其他博客 增加环境变量 GH_TOKEN
- 定时触发travis构建,参考官方文档
- 调用 generate.js 脚本生成 blog & 自动将变更 commit & push 会repository
.travis.yml
language: node_js
node_js:
script: node generate.js
branches:
only:
- gh-pages
deploy:
provider: pages
skip_cleanup: true
github_token: $GH_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
on:
branch: gh-pages
- 设置 Travis Cron Jobs ,每日自动构建 gh-pages 分支
TODO
- [] issue更新自动触发travis构建
参考[ref]:
- https://docs.travis-ci.com/user/deployment/pages/
- http://www.ruanyifeng.com/blog/2017/12/travis_ci_tutorial.html