Skip to content

Commit

Permalink
Introduce a netlify.toml configuration to fix docs generation on Ne…
Browse files Browse the repository at this point in the history
…tlify.

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.
  • Loading branch information
abernix committed Aug 28, 2018
1 parent 2657e9b commit d6921bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build]
base = "docs/"
publish = "docs/public/"
command = "npm install && npm run build"
[build.environment]
NPM_VERSION = "6"

0 comments on commit d6921bb

Please sign in to comment.