项目部署 Github 并且仓库名为 "userName".github.io

项目设置绑定域名,建议开启 https

在 项目/设置/githubPage 下绑定域名

域名绑定页面,选 cname(github 给的二级域名),线路:境外

项目部署到 coding 上

https://coding.net

项目/构建与部署 点立即部署(后续可自动化部署)

同页面上半部分找到二级域名为 cname,线路选择默认。并在当前页面的设置里绑定你的域名(申请证书失败的话需要把域名境外线路调回默认)

hexo 快速部署项目插件

以下为 ssh 连接,可自行百度(双账号邮箱建议保持一致,方便注册 ssh)
npm i hexo-deployer-git -S
yarn add hexo-deployer-git

hexo 配置文件

deploy:
type: git
# 触发分支
branch: master
repo:
github: git@github.com:<userName>/<projectName>.git
coding: git@e.coding.net:xxx/xxx.git
触发流程
hexo clean
hexo generate
hexo deploy