From d6921bb5e67221603e5a29f98d4c0e84cd434679 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Tue, 28 Aug 2018 12:01:06 +0300 Subject: [PATCH] Introduce a `netlify.toml` configuration to fix docs generation on Netlify. Without this file, Netlify was choosing to build the documentation using the npm scripts present in the root `package.json`, rather than the `package.json` in the `docs/` directory, as it should be. While it's strange that this behavior just cropped up around a recent swap to using `@apollographql/apollo-upload-server`, I suspect that the problem is more deeply rooted than that and we were just accidentally getting away with the past behavior - which was defined less explicitly in the Netlify UI. Now, with this `netlify.toml` file, we can run the exact build step we need for documentation and also gain the ability to have per-branch control over that configuration, which has been necessary in the past. --- netlify.toml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000000..69d567780bf --- /dev/null +++ b/netlify.toml @@ -0,0 +1,6 @@ +[build] + base = "docs/" + publish = "docs/public/" + command = "npm install && npm run build" +[build.environment] + NPM_VERSION = "6"