构建一个Firebase / Hugo静态网站,在Github repo更改时进行更新。
我正在使用快速入门指南中的标准主题:https://gohugo.io/getting-started/quick-start/
网页在本地运行良好。
hugo server -D
当我将构建部署到Firebase时,网页运行正常。
firebase deploy --only hosting
尽管Google Cloud Build成功说出,但当我从Github repo触发构建时,网页运行不正常。
访问URL的结果是以下消息:
Page Not Found
This file does not exist and there was no index.html found in the current directory or 404.html in the root directory.
Why am I seeing this?
You may have deployed the wrong directory for your application. Check your firebase.json and make sure the public directory is pointing to a directory that contains an index.html file.
You can also add a 404.html in the root of your site to replace this page with a custom error page.
我已经尝试将config.toml中的“baseURL”更改为自定义域,firebase域和Github repo URL。没有。
4/16更新:如果我在.gitignore中不包含公用文件夹,则它可以正常工作
你完成了CI Setup吗?