没有修改主题前的自动部署流程十分顺滑
1 2 3 4 5 6
| $ hexo new "My New Post" $ git add . $ git commit msg $ git push
|
一切变故来源于更换了更好看的主题
同样操作一遍,线上的直接404,在.travis.yml脚本中增加了 npm install,就此成功了一次,当第三次推送时又不行了,本地server完全OK,查看node版本,换成.travis.yml中的10.22.0,再clean掉,不行,第五次,第六次,尝试了多种办法还是不行,一气之下改成私有部署,本地1个命令,真香。
推荐私有部署 hexo-deployer-git 再无头秃烦恼
1 2 3 4 5
| deploy: type: git repo: token: $GH_TOKEN branch: gh-pages
|
1 2 3 4 5 6
| $ npx hexo clean && npx hexo deploy
|
TroubleShooting
- 将主题换回默认主题,部署成功,说明问题出在
Next
主题包上
- 在
.travis.yml
文件内 install
下增加一条安装主题的命令 git clone --branch v8.0.0 https://github.com/next-theme/hexo-theme-next themes/next
即可
- 重新在
main
分支上推一下代码即可安装成功