-
Notifications
You must be signed in to change notification settings - Fork 10
/
netlify.toml
19 lines (17 loc) · 975 Bytes
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# added to the rule below so that the root docs redirect doesn't infinitely redirect, see https://answers.netlify.com/t/err-too-many-redirects-after-upgrading-to-nextjs-v5-runtime-from-v4/117358
[[redirects]]
from = "/docs"
to = "https://ameliorate-docs.netlify.app/docs"
status = 200
force = true
# thanks https://answers.netlify.com/t/support-guide-can-i-deploy-multiple-repositories-in-a-single-site/179
[[redirects]]
from = "/docs/*"
to = "https://ameliorate-docs.netlify.app/docs/:splat"
status = 200
force = true
[build]
# Build app only if there are changes outside the docs-site directory.
# If grep finds files changed outside of docs-site/, it will exit with 0 status, so we use `!` to invert the status and run build if files are found.
# `ignore` command examples here https://answers.netlify.com/t/support-guide-how-to-use-the-ignore-command/37517
ignore = "! git diff --name-only $CACHED_COMMIT_REF $COMMIT_REF | grep -v -q docs-site"