参考这篇文章部署了 Hugo ,https://www.fournoas.com/posts/deploy-hugo-site-using-github-actions/
单独 Public 上传之后,https://reid00.github.io/ 可以正常访问,
但是 用 Github Action 之后发现个人主页变成了 index.xml 的形式
查看直接和 public 里面比,少了很多东西
各位彦祖,有知道怎么回事的吗?
name: Deploy Hugo Site to Github Pages on Main Branch
on:
  push:
    branches:
      - main
jobs:
  build-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository code
        uses: actions/checkout@v3
        
      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: latest  # 这里的版本号要与你安装的版本号一致
          extended: true
      - name: Build
        run: hugo --minify
      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} # 这里的 ACTIONS_DEPLOY_KEY 则是上面设置 Private Key 的变量名
          external_repository: Reid00/Reid00.github.io # Pages 远程仓库 
          publish_dir: "./public"
          keep_files: false # remove existing files
          publish_branch: main  # deploying branch
          commit_message: ${{ github.event.head_commit.message }}
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.