我必须在netlify上为我的大学部署一个gatsby网站。我在gitlab上有两个子文件夹,这两个子文件夹都是单独的gatsby项目。我认为部署失败,因为它尝试部署不是gatsby项目的master文件夹。我将Build命令的“ npm run build”和“ gatsbyjs-starter-tailwindplay / public”插入到Publish目录中。这是告诉netlify应该部署gatsbyjs-starter-tailwindplay文件夹的正确方法,而gatsbyjs-starter-tailwindplay是回购子文件夹之一?
我得到以下部署日志:
def arbUnicodeGen(size: Int) =
Gen.listOfN(size, Arbitrary.arbChar.arbitrary).map(_.mkString)
但是,如果我进入gatsbyjs-starter-tailwindplay文件夹,则没有公用文件夹,但肯定是在我的PC上的克隆存储库中!不应该对git超级有经验。仅具有默认gatsby初始页的回购协议是相同的,我可以很好地部署它,所以我认为应该是这样的!!
答案 0 :(得分:0)
如果在存储库根目录中添加netlify.toml
文件会怎样?
# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build]
# Directory to change to before starting a build.
# This is where we will look for package.json/.nvmrc/etc.
base = "gatsbyjs-starter-tailwindplay/"
# Directory (relative to root of your repo) that contains the deploy-ready
# HTML files and assets generated by the build. If a base directory has
# been specified, include it in the publish directory path.
publish = "gatsbyjs-starter-tailwindplay/public/"
# Default build command.
command = "npm run build"
public
和.cache
文件夹是gatsby构建过程的结果。它们被.gitignore
文件中的git设置为忽略。
答案 1 :(得分:0)
我遇到了同样的问题,所以我使用了submodules。
但是Netlify刚刚启动了this功能。