弃坑 travis,开始收费了
https://docs.travis-ci.com/user/billing-overview/#usage---credits
workflow 配置
源码根目录创建 .github/workflows/deploy.yml
生成密钥
ssh-keygen -t rsa -b 4096 -C “Hexo Deploy Key” -f github-deploy-key -N “”
1 | github-deploy-key —— 私钥 |
源码项目 配置私钥 Settings -> Security -> Actions
目标项目 配置公钥 Settings -> Security -> Deploy keys
一定要勾选 Allow write access 来打开写权限,否则无法写入会导致部署失败
参考
https://github.com/peaceiris/actions-gh-pages
https://zhuanlan.zhihu.com/p/170563000
https://www.cnblogs.com/xueyubao/p/13991935.html
https://cloud.tencent.com/developer/article/1953391
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-versioned-actions