在 Netlify 上部署失败状态但站点仍在部署

Deploy fail status on Netlify but site still deploys

我正在使用 blogdown 创建我的第一个站点,并尝试按照 blogdown[here]

的在线文档中的部署说明进行操作

这是我从文档中了解到的,在 RStudio 中构建站点并将 public 文件夹的内容复制到 git 存储库中。存储库 sn248.github.io 用于包含我基于 jekyll 的静态网页的内容,并使用 Github 页面托管。它只有几个帖子,我打算手动将其转换为基于 blogdown 的网站。

我确实看到我的新网站有我想要的主题,但我担心我在 Netlify 上看到的部署失败消息(下图)

12:09:21 AM: Installing Hugo 0.30
12:09:24 AM: Error: Unable to locate Config file. Perhaps you need to create a new site.
       Run `hugo help new` for details. (Config File "config" Not Found in "[/opt/build/repo]")
12:09:25 AM: Build complete: exit code: 255
12:09:25 AM: Cleaning up docker container
12:09:25 AM: Error running command: Build script returned non-zero exit code: 255
12:09:26 AM: An error occurred while building the site, skipping the deploy and cache refresh.
12:09:26 AM: Build script returned non-zero exit code: 255
12:09:26 AM: Finished processing build request in 13.85761953s

我已将 Build command: 指定为 hugo,将 Publish Directory: 指定为 public。我也尝试过 HUGO_VERSION 0.24.1 (如文档中所示)但得到了相同的结果。查看错误消息,似乎我在这里缺少一个基本步骤。但我也不明白如果找不到配置文件,如何构建任何东西。

Link 到我的 Git repo

Link 到我的 Site

如有任何帮助,我们将不胜感激,谢谢! SN248

您的 Github 存储库包含一个 prebuilt 网站,您不应使用 hugo 在 Netlify 上再次构建它。请阅读 blogdown 书中的 the documentation on Netlify。引用书中相关部分:

[...] you can certainly prebuild your website using any tools, push it to GitHub, and Netlify is still able to deploy it for you. What you need to do is to leave the build command empty, and tell Netlify your publish directory (e.g., Hugo's default public/, but if your prebuilt website is under the root directory, specify . as the publish directory instead).