livebug / livebug.github.io

blogs by hugo geng
https://livebug.github.io/
0 stars 0 forks source link

使用 Github Actions 自动化发布博客 #4

Open livebug opened 10 months ago

livebug commented 10 months ago

https://livebug.github.io/blogs/20230930-github-actions/

介绍背景: 博客网站myblog仓库底下有两个子库,一个子库是用来存储markdown文章的blogs仓库,一个是用来存储public内容的github pages库 livebug.github.io仓库 当博客网站样式更新提交,或者文章提交,触发myblog仓库的 actions ,执行完之后发布到pages仓库 开发myblog仓库的提交 actions 1# Sample workflow for building and deploying a Hugo site to GitHub Pages 2name: Deploy Hugo site to Pages 3 4on: 5 # Runs on pushes targeting the default branch 6 push: 7 branches: ["master"] 8 9 # Allows you to run this workflow manually from the Actions tab 10 workflow_dispatch: 11 12# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 13permissions: 14 contents: read 15 pages: write 16 id-token: write 17 18# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.

livebug commented 10 months ago

action 认证失败

需要重新刷新一下密钥,因为生成密钥时选择了期限,重新在仓库变量那重新输入刷新一下