gpt4 book ai didi

r - Netlify 上的部署失败状态,但站点仍可部署

转载 作者:行者123 更新时间:2023-12-01 16:23:41 25 4
gpt4 key购买 nike

我正在使用 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

我已将我的构建命令:指定为hugo,并将我的发布目录:指定为public。我也尝试过使用 HUGO_VERSION 0.24.1 (如文档中所示),但得到了相同的结果。看看错误消息,我似乎缺少一个基本步骤。但我也不明白如果没有找到配置文件,那么如何构建任何东西。

链接到我的Git repo

链接到我的Site

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

最佳答案

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

[...] 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).

关于r - Netlify 上的部署失败状态,但站点仍可部署,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46924031/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com