From d0281240c03e38a2ee74e5b8b6db810da1d3f26a Mon Sep 17 00:00:00 2001 From: Thiago Teixeira <103002884+sfc-gh-tteixeira@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:05:55 -0800 Subject: [PATCH 1/3] Debugging --- scripts/build-search-index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build-search-index.js b/scripts/build-search-index.js index 22733e1b6..e0eb469cf 100644 --- a/scripts/build-search-index.js +++ b/scripts/build-search-index.js @@ -164,10 +164,11 @@ function getAllFilesInDirectory(articleDirectory, files) { console.log("Gibberish", process.env.GIBBERISH, process.env.GIBBERISH == "GIBBERISH"); console.log("Algolia", process.env.ALGOLIA_SECRET); console.log("CLI args", process.argv); + console.log("Env", process.env, Object.values(process.env).map(x => typeof x)); const client = algoliasearch( "XNXFGO6BQ1", - process.env.ALGOLIA_SECRET.trim(), + process.env.ALGOLIA_SECRET.trim() ); const index = client.initIndex("documentation"); From 45f381fa9f01fe2c8b865a04099375d793821867 Mon Sep 17 00:00:00 2001 From: Thiago Teixeira <103002884+sfc-gh-tteixeira@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:13:01 -0800 Subject: [PATCH 2/3] trying with argv --- scripts/build-search-index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/build-search-index.js b/scripts/build-search-index.js index e0eb469cf..7a58d08e5 100644 --- a/scripts/build-search-index.js +++ b/scripts/build-search-index.js @@ -164,11 +164,10 @@ function getAllFilesInDirectory(articleDirectory, files) { console.log("Gibberish", process.env.GIBBERISH, process.env.GIBBERISH == "GIBBERISH"); console.log("Algolia", process.env.ALGOLIA_SECRET); console.log("CLI args", process.argv); - console.log("Env", process.env, Object.values(process.env).map(x => typeof x)); const client = algoliasearch( "XNXFGO6BQ1", - process.env.ALGOLIA_SECRET.trim() + process.argv[2], ); const index = client.initIndex("documentation"); From 9985e8cdfefc911437c841fbde26d3cf9e1574ba Mon Sep 17 00:00:00 2001 From: Thiago Teixeira <103002884+sfc-gh-tteixeira@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:36:01 -0800 Subject: [PATCH 3/3] Use latest key for search (still need to move to a secret later) --- components/utilities/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/utilities/search.js b/components/utilities/search.js index 60628c8f0..a77f9bc95 100644 --- a/components/utilities/search.js +++ b/components/utilities/search.js @@ -137,7 +137,7 @@ const Search = () => { const searchClient = algoliasearch( "XNXFGO6BQ1", - "b90675aaf5269e66b8b0cd042dacf0d0" + "dd82fd414de60db7ffbcbf30eca68013" ); function Hit(props) {