Featured image of post hugo文章部署错误

hugo文章部署错误

hugo文章部署错误

报错信息

1
2
deploy
Action failed with error Unexpected HTTP response: 404

image-20241215153627225

之前经常因为写错yaml配置文件而报错,于是我检查了我新上传的一篇文章,检查了很多遍都没有发现错误,于是上网搜索,不是文章的错误,而是在.github/workflows/hugo_deploy.yaml 目录,有一个未正确配置的工作流 YAML 文件。

错误原因

image-20241215152936144

这里的latest要指定为自己使用的特定版本,不然当hugo更新时,自己使用的还是旧版本,就会出现问题,我的版本是0.136.5,更改后就不报错了。

1
2
3
4
5
- name: Setup Hugo
          uses: peaceiris/actions-hugo@v3
          with:
              hugo-version: "0.136.5"
              extended: true
Licensed under CC BY-NC-SA 4.0
使用 Hugo 构建
主题 StackJimmy 设计