From e566e6c8e715b6c88611a52fd87831fcef12eca8 Mon Sep 17 00:00:00 2001 From: Ryota Date: Mon, 9 Dec 2024 22:16:40 +0000 Subject: [PATCH] Update branch based context to production This removes the branch based context of "context.main" which would be triggered and override any other contexts even during the PR cycle. The assumption here is that "production" context is marked appropriately on Netlify admin UI, and once it's in place, this should have the same effect to ensure we do not publish any draft or future date posts. --- netlify.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index 456da44785e93..9a3e3819f5419 100644 --- a/netlify.toml +++ b/netlify.toml @@ -21,8 +21,10 @@ command = "git submodule update --init --recursive --depth 1 && make deploy-prev [context.branch-deploy] command = "git submodule update --init --recursive --depth 1 && make non-production-build && npx -y pagefind --site public" -[context.main] -# This context is triggered by the `main` branch and allows search indexing -# DO NOT REMOVE THIS (contact @kubernetes/sig-docs-leads) +[context.production] +# Rather than specifying context.main, which will supersede any of the above +# context, make a production specific build separately based on the context +# with the same priority. +# Ref: https://docs.netlify.com/configure-builds/file-based-configuration/#deploy-contexts publish = "public" command = "git submodule update --init --recursive --depth 1 && make production-build && npx -y pagefind --site public"