docs: move netlify.toml to website

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-06-21 13:21:48 +02:00
parent d887eaf045
commit 9452b84de8

38
website/netlify.toml Normal file
View File

@@ -0,0 +1,38 @@
[build]
publish = "build/"
command = "yarn build"
[context.production]
# Do not build the site if there's no site-related changes since the last
# commit.
# This assumes PRs to `main` only contain merge commits, so it's safe to
# compare the current commit to the previous.
# We can't use `$CACHED_COMMIT_REF` because that points to the PR preview
# that was built before merging.
ignore = "git diff --quiet HEAD^ HEAD -- . ../docs/"
[context.deploy-preview]
# Do not build the site if there's no site-related changes since the last
# deploy.
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../docs/"
command = "yarn build:withoutAuth"
[[redirects]]
from = "/github-proxy/*"
to = "https://github.com/:splat"
status = 200
[[redirects]]
from = "/github-api-proxy/*"
to = "https://api.github.com/:splat"
status = 200
[[redirects]]
from = "/docs-access/*"
to = "https://j20f3pfq11.execute-api.us-east-1.amazonaws.com/Prod/u/:splat"
status = 200
[[redirects]]
from = "/reference"
to = "/reference/universe/alpine"
status = 302