因项目的不同适当的改造吧,本文以hexo为例。
拉取coding.net的代码和github的代码到本地
- 确保代码能够正常的运行,commit,push
- 在项目的目录外新建一个push.bat文件
快速预览
如何一步到位提交到仓库
脚本中的变量说明
- artsPath 新增文章的目录
- codingPath coding的目录
- githubPath github的目录
复制文章然后自动执行命令进行部署
修改脚本中对应的路径后执行
push
1 | xcopy F:\CodingRepos\ymhexo\arts F:\CodingRepos\ymhexo\yimocoding\source\_posts /Y |