From ec0b9465f35a112c54e967153c13e92bbf989d21 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Sat, 3 Aug 2024 05:59:40 -0400 Subject: [PATCH] [CI] Netlify production sanity checks: ignore canonical links (#4943) --- netlify.toml | 4 ++-- package.json | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/netlify.toml b/netlify.toml index e40a456e069c..5c43ee2b633d 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,9 +1,9 @@ [build] publish = "public" -command = "npm run seq -- build:preview diff:check" +command = "npm run netlify-build:preview" [context.production] -command = "npm run seq -- build:production diff:check" +command = "npm run netlify-build:production" [[redirects]] from = "https://docs.opentelemetry.io/*" diff --git a/package.json b/package.json index 47e80bea6d70..b8ff6a6b4a66 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "spelling": "cSpell:ignore docsy elemetry HTMLTEST hugo loglevel netlify nowrap prebuild precheck preinstall postbuild postget refcache textlint -", + "spelling": "cSpell:ignore docsy elemetry htmltest hugo loglevel netlify nowrap prebuild precheck preinstall postbuild postget refcache textlint -", "Notes": [ "The 'all' runs _all_ named scripts in sequence, even if one fails; and exits with failure in that case." ], @@ -75,18 +75,22 @@ "install:netlify-cli": "npm list netlify-cli || npm install netlify-cli", "log:check:links": "npm run check:links | tee tmp/build-log.txt", "make:public": "make public ls-public", + "netlify-build:preview": "npm run seq -- build:preview diff:check", + "netlify-build:production": "npm run build:production", "postbuild:preview": "npm run _check:links--warn", "postbuild:production": "npm run _check:links--warn", "postget:submodule": "git submodule", + "postnetlify-build:production": "git restore .htmltest.yml && npm run diff:check", "prebuild:preview": "npm run _prebuild", "prebuild:production": "npm run _prebuild", "prebuild": "npm run _prebuild", "precheck:links:internal": "npm run build", "precheck:links": "npm run build", + "prefix:submodules": "npm run update:submodule", + "prenetlify-build:production": "echo 'IgnoreTagAttribute: rel' >> .htmltest.yml", "prepare": "npm run seq -- get:submodule _prepare:docsy", "preserve:hugo": "npm run _prebuild", "preserve:netlify": "npm run seq -- _prebuild install:netlify-cli", - "prefix:submodules": "npm run update:submodule", "schemas:update": "npm run update:submodule content-modules/opentelemetry-specification", "seq": "bash -c 'for cmd in \"$@\"; do npm run $cmd || exit 1; done' - ", "serve:hugo": "npm run _serve:hugo -- --renderToMemory",