本地安装
| |
新建文章
| |
本地部署
| |
Github Action
- 新建两个repository:
Blob-Source: 私有,博客源码xxx.github.io: 公开,博客页面
- 添加个人访问令牌作为TOKEN存储库中调用的Secret
- 在
Settings->Developer Settings->Personal access tokens (classic),注意分配权限为repo, workflow - 在
Blob-Source中Settings->Secrets and variables->Add deploy key添加上述TOKEN
- 在
- 设置环境变量并将此操作添加到工作流程中
1 2 3 4- name: Deploy Web uses: peaceiris/actions-gh-pages@v3 with: PERSONAL_TOKEN: ${{ secrets.DEPLOY_TOKEN }} - 设置部署触发条件
1 2 3 4 5 6 7 8on: push: branches: - master workflow_dispatch: schedule: # Run on the hour - cron: '0 * * * *'