From d71df3428c5607b9c194b0158ae63b72eb68fe78 Mon Sep 17 00:00:00 2001 From: EthanRin Date: Wed, 11 Dec 2024 14:32:27 +1100 Subject: [PATCH 1/8] added API keys using env --- astro.config.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/astro.config.mjs b/astro.config.mjs index d7d187a4d..7ba76abb7 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -19,6 +19,11 @@ export default defineConfig({ starlightLinksValidator({ errorOnRelativeLinks: true, }), + starlightDocSearch({ + appId: process.env.DOCSEARCH_API_ID, + apiKey: process.env.DOCSEARCH_API_SERACH_KEY, + indexName: process.env.DOCSEARCH_INDEX_NAME, + }), ], expressiveCode: { // theme: ["github-dark", "github-light"], From 91d3fda37adf14296cf9af59d71488042f005445 Mon Sep 17 00:00:00 2001 From: EthanRin Date: Wed, 11 Dec 2024 14:41:56 +1100 Subject: [PATCH 2/8] upated config tto properly load env variables --- astro.config.mjs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 7ba76abb7..a8eded979 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,12 @@ import solidJs from "@astrojs/solid-js"; import react from "@astrojs/react"; import starlightLinksValidator from 'starlight-links-validator'; import sitemap from "@astrojs/sitemap"; +import starlightDocSearch from '@astrojs/starlight-docsearch'; +import { loadEnv } from "vite"; + +const { DOCSEARCH_API_ID } = loadEnv(process.env.DOCSEARCH_API_ID, process.cwd(), ""); +const { DOCSEARCH_API_SERACH_KEY } = loadEnv(process.env.DOCSEARCH_API_SERACH_KEY, process.cwd(), ""); +const { DOCSEARCH_INDEX_NAME } = loadEnv(process.env.DOCSEARCH_INDEX_NAME, process.cwd(), ""); // https://astro.build/config export default defineConfig({ @@ -20,9 +26,9 @@ export default defineConfig({ errorOnRelativeLinks: true, }), starlightDocSearch({ - appId: process.env.DOCSEARCH_API_ID, - apiKey: process.env.DOCSEARCH_API_SERACH_KEY, - indexName: process.env.DOCSEARCH_INDEX_NAME, + appId: DOCSEARCH_API_ID, + apiKey: DOCSEARCH_API_SERACH_KEY, + indexName: DOCSEARCH_INDEX_NAME, }), ], expressiveCode: { From b0e52a072ca542d005b61029ea4f769725a702be Mon Sep 17 00:00:00 2001 From: EthanRin Date: Wed, 11 Dec 2024 14:51:31 +1100 Subject: [PATCH 3/8] updated dependencies to add starlight-docsearch --- package-lock.json | 304 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 305 insertions(+) diff --git a/package-lock.json b/package-lock.json index 8a694b86c..75a33ce2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@astrojs/sitemap": "^3.1.6", "@astrojs/solid-js": "^4.4.0", "@astrojs/starlight": "^0.28.2", + "@astrojs/starlight-docsearch": "^0.3.0", "@mdx-js/mdx": "3.0.1", "@types/react": "18.3.2", "@types/react-dom": "18.3.0", @@ -42,6 +43,214 @@ "accessible-astro-components": "2.3.6" } }, + "node_modules/@algolia/autocomplete-core": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.7.tgz", + "integrity": "sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q==", + "dependencies": { + "@algolia/autocomplete-plugin-algolia-insights": "1.17.7", + "@algolia/autocomplete-shared": "1.17.7" + } + }, + "node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.7.tgz", + "integrity": "sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A==", + "dependencies": { + "@algolia/autocomplete-shared": "1.17.7" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" + } + }, + "node_modules/@algolia/autocomplete-preset-algolia": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.7.tgz", + "integrity": "sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA==", + "dependencies": { + "@algolia/autocomplete-shared": "1.17.7" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/autocomplete-shared": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.7.tgz", + "integrity": "sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg==", + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/client-abtesting": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.17.0.tgz", + "integrity": "sha512-6+7hPdOEPfJqjWNYPRaVcttLLAtVqQyp1U7xBA1e1uSya1ivIr9FtS/GBr31mfvwk2N2yxV4W7itxuBtST8SWg==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-analytics": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.17.0.tgz", + "integrity": "sha512-nhJ+elL8h0Fts3xD9261zE2NvTs7nPMe9/SfAgMnWnbvxmuhJn7ZymnBsfm2VkTDb4Dy810ZAdBfzYEk7PjlAw==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-common": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.17.0.tgz", + "integrity": "sha512-9eC8i41/4xcQ/wI6fVM4LwC/ZGcDl3mToqjM0wTZzePWhXgRrdzOzqy/XgP+L1yYCDfkMFBZZsruNL5U8aEOag==", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-insights": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.17.0.tgz", + "integrity": "sha512-JL/vWNPUIuScsJubyC4aPHkpMftlK2qGqMiR2gy0rGvrh8v0w+ec6Ebq+efoFgE8wO55HJPTxiKeerE1DaQgvA==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-personalization": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.17.0.tgz", + "integrity": "sha512-PkMUfww8QiRpyLkW4kzmc7IJDcW90sfUpnTgUOVlug5zEE2iv1ruHrJxdcNRTXkA0fgVpHu3oxXmCQL/ie2p7A==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-query-suggestions": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.17.0.tgz", + "integrity": "sha512-bokfgPN2whetLuiX9NB6C6d7Eke+dvHuASOPiB+jdI8Z6hacLHkcJjYeZY4Mppj0/oJ1KlyNivj+8WNpZeGhYA==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-search": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.17.0.tgz", + "integrity": "sha512-alY3U79fiEvlR/0optgt1LZp9MfthXFnuEA4GYS81svozDOF61gdvxgBjt6SYtmskmTQQZDWVgakvUvvHrDzMw==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/ingestion": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.17.0.tgz", + "integrity": "sha512-9+mO+FbIpWz6izh1lXzON9BcenBKx4K3qVjSWiFFmL8nv+7b7zpGq++LXWr/Lxv/bZ9+D71Go6QVL6AZQhFOmg==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/monitoring": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.17.0.tgz", + "integrity": "sha512-Db7Qh51zVchmHa8d9nQFzTz2Ta6H2D4dpCnPj1giC/LE6UG/6e3iOnRxUzV+9ZR7etHKIrri2hbnkyNrvbqA9A==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/recommend": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.17.0.tgz", + "integrity": "sha512-7vM4+mfuLYbslj8+RNsP/ISwY7izu5HcQqQhA0l+q3EZRHF+PBeRaJXc3S1N0fTRxj8ystvwXWZPmjssB/xMLw==", + "dependencies": { + "@algolia/client-common": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.17.0.tgz", + "integrity": "sha512-bXSiPL2R08s4e9qvNZsJA0bXZeyWH2A5D4shS8kRT22b8GgjtnGTuoZmi6MxtKOEaN0lpHPbjvjXAO7UIOhDog==", + "dependencies": { + "@algolia/client-common": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/requester-fetch": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.17.0.tgz", + "integrity": "sha512-mjJ6Xv7TlDDoZ6RLKrEzH1ved3g2GAq3YJjb94bA639INfxK1HM8A/wCAFSZ8ye+QM/jppwauDXe1PENkuareQ==", + "dependencies": { + "@algolia/client-common": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/requester-node-http": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.17.0.tgz", + "integrity": "sha512-Z2BXTR7BctlGPNig21k2wf/5nlH+96lU2UElzXTKiptyn2iM8lDU8zdO+dRll0AxQUxUGWEnkBysst9xL3S2cg==", + "dependencies": { + "@algolia/client-common": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -304,6 +513,18 @@ "astro": "^4.14.0" } }, + "node_modules/@astrojs/starlight-docsearch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@astrojs/starlight-docsearch/-/starlight-docsearch-0.3.0.tgz", + "integrity": "sha512-GA8bSuXb0cX4U0Ic+9iUpd+lB1V+qgJbqXwJ6gQTC1wowX0KXrFiBaWzrfe4xJJYtPFuEe+hl09WdlNpdPH98w==", + "dependencies": { + "@docsearch/css": "^3.6.0", + "@docsearch/js": "^3.6.0" + }, + "peerDependencies": { + "@astrojs/starlight": ">=0.28.0" + } + }, "node_modules/@astrojs/starlight/node_modules/astro-expressive-code": { "version": "0.35.6", "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.35.6.tgz", @@ -677,6 +898,51 @@ "node": ">=14" } }, + "node_modules/@docsearch/css": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.8.0.tgz", + "integrity": "sha512-pieeipSOW4sQ0+bE5UFC51AOZp9NGxg89wAlZ1BAQFaiRAGK1IKUaPQ0UGZeNctJXyqZ1UvBtOQh2HH+U5GtmA==" + }, + "node_modules/@docsearch/js": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.8.0.tgz", + "integrity": "sha512-PVuV629f5UcYRtBWqK7ID6vNL5647+2ADJypwTjfeBIrJfwPuHtzLy39hMGMfFK+0xgRyhTR0FZ83EkdEraBlg==", + "dependencies": { + "@docsearch/react": "3.8.0", + "preact": "^10.0.0" + } + }, + "node_modules/@docsearch/react": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.8.0.tgz", + "integrity": "sha512-WnFK720+iwTVt94CxY3u+FgX6exb3BfN5kE9xUY6uuAH/9W/UFboBZFLlrw/zxFRHoHZCOXRtOylsXF+6LHI+Q==", + "dependencies": { + "@algolia/autocomplete-core": "1.17.7", + "@algolia/autocomplete-preset-algolia": "1.17.7", + "@docsearch/css": "3.8.0", + "algoliasearch": "^5.12.0" + }, + "peerDependencies": { + "@types/react": ">= 16.8.0 < 19.0.0", + "react": ">= 16.8.0 < 19.0.0", + "react-dom": ">= 16.8.0 < 19.0.0", + "search-insights": ">= 1 < 3" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "search-insights": { + "optional": true + } + } + }, "node_modules/@emnapi/runtime": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.2.0.tgz", @@ -2287,6 +2553,29 @@ "node": ">= 6.0.0" } }, + "node_modules/algoliasearch": { + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.17.0.tgz", + "integrity": "sha512-BpuFprDFc3Pe9a1ZXLzLeqZ+l8Ur37AfzBswkOB4LwikqnRPbIGdluT/nFc/Xk+u/QMxMzUlTN+izqQJVb5vYA==", + "dependencies": { + "@algolia/client-abtesting": "5.17.0", + "@algolia/client-analytics": "5.17.0", + "@algolia/client-common": "5.17.0", + "@algolia/client-insights": "5.17.0", + "@algolia/client-personalization": "5.17.0", + "@algolia/client-query-suggestions": "5.17.0", + "@algolia/client-search": "5.17.0", + "@algolia/ingestion": "1.17.0", + "@algolia/monitoring": "1.17.0", + "@algolia/recommend": "5.17.0", + "@algolia/requester-browser-xhr": "5.17.0", + "@algolia/requester-fetch": "5.17.0", + "@algolia/requester-node-http": "5.17.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/ansi-align": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", @@ -7139,6 +7428,15 @@ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, + "node_modules/preact": { + "version": "10.25.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.25.1.tgz", + "integrity": "sha512-frxeZV2vhQSohQwJ7FvlqC40ze89+8friponWUFeVEkaCfhC6Eu4V0iND5C9CXz8JLndV07QRDeXzH1+Anz5Og==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, "node_modules/preferred-pm": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-4.0.0.tgz", @@ -7727,6 +8025,12 @@ "loose-envify": "^1.1.0" } }, + "node_modules/search-insights": { + "version": "2.17.3", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", + "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", + "peer": true + }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", diff --git a/package.json b/package.json index ae960a2a7..365684dca 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@astrojs/sitemap": "^3.1.6", "@astrojs/solid-js": "^4.4.0", "@astrojs/starlight": "^0.28.2", + "@astrojs/starlight-docsearch": "^0.3.0", "@mdx-js/mdx": "3.0.1", "@types/react": "18.3.2", "@types/react-dom": "18.3.0", From 40bcaa98928d77ba7b6c9db1b4a222346c9e5d06 Mon Sep 17 00:00:00 2001 From: EthanRin Date: Wed, 18 Dec 2024 23:51:03 +1100 Subject: [PATCH 4/8] updated environment variables and fail safe --- astro.config.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index a8eded979..21649af28 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -8,9 +8,14 @@ import starlightDocSearch from '@astrojs/starlight-docsearch'; import { loadEnv } from "vite"; const { DOCSEARCH_API_ID } = loadEnv(process.env.DOCSEARCH_API_ID, process.cwd(), ""); -const { DOCSEARCH_API_SERACH_KEY } = loadEnv(process.env.DOCSEARCH_API_SERACH_KEY, process.cwd(), ""); +const { DOCSEARCH_API_SEARCH_KEY } = loadEnv(process.env.DOCSEARCH_API_SERACH_KEY, process.cwd(), ""); const { DOCSEARCH_INDEX_NAME } = loadEnv(process.env.DOCSEARCH_INDEX_NAME, process.cwd(), ""); +if (!DOCSEARCH_API_ID || !DOCSEARCH_API_SEARCH_KEY || !DOCSEARCH_INDEX_NAME){ + console.error("Algolia DocSearch enviroment variables are invalid. Please check configuration!"); + process.exit(1); +} + // https://astro.build/config export default defineConfig({ site: 'https://splashkit.io/', From 909b78c872b4714217c28808cbdebc7d577d7a3a Mon Sep 17 00:00:00 2001 From: omckeon Date: Thu, 13 Feb 2025 12:56:37 +0000 Subject: [PATCH 5/8] Minor updates + testing secret variables in workflow --- .github/workflows/astro.yml | 4 + astro.config.mjs | 4 +- package-lock.json | 389 +----------------------------------- 3 files changed, 7 insertions(+), 390 deletions(-) diff --git a/.github/workflows/astro.yml b/.github/workflows/astro.yml index 21882bda0..dc3581588 100644 --- a/.github/workflows/astro.yml +++ b/.github/workflows/astro.yml @@ -21,6 +21,10 @@ jobs: npm install - name: Upload your site uses: withastro/action@v3 + with: + DOCSEARCH_API_ID: ${{ secrets.DOCSEARCH_API_ID }} + DOCSEARCH_API_SEARCH_KEY: ${{ secrets.DOCSEARCH_API_SEARCH_KEY }} + DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }} deploy: needs: build diff --git a/astro.config.mjs b/astro.config.mjs index 9c4f66d4e..d28309f2e 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -11,7 +11,7 @@ import starlightDocSearch from '@astrojs/starlight-docsearch'; import { loadEnv } from "vite"; const { DOCSEARCH_API_ID } = loadEnv(process.env.DOCSEARCH_API_ID, process.cwd(), ""); -const { DOCSEARCH_API_SEARCH_KEY } = loadEnv(process.env.DOCSEARCH_API_SERACH_KEY, process.cwd(), ""); +const { DOCSEARCH_API_SEARCH_KEY } = loadEnv(process.env.DOCSEARCH_API_SEARCH_KEY, process.cwd(), ""); const { DOCSEARCH_INDEX_NAME } = loadEnv(process.env.DOCSEARCH_INDEX_NAME, process.cwd(), ""); if (!DOCSEARCH_API_ID || !DOCSEARCH_API_SEARCH_KEY || !DOCSEARCH_INDEX_NAME){ @@ -37,7 +37,7 @@ export default defineConfig({ }), starlightDocSearch({ appId: DOCSEARCH_API_ID, - apiKey: DOCSEARCH_API_SERACH_KEY, + apiKey: DOCSEARCH_API_SEARCH_KEY, indexName: DOCSEARCH_INDEX_NAME, }), ], diff --git a/package-lock.json b/package-lock.json index e7857a227..e502a1572 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "starlight-links-validator": "^0.14.1" }, "devDependencies": { - "accessible-astro-components": "2.3.6" + "accessible-astro-components": "^3.0.1" } }, "node_modules/@algolia/autocomplete-core": { @@ -236,17 +236,6 @@ "node": ">= 14.0.0" } }, - "node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -842,366 +831,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.22.0.tgz", - "integrity": "sha512-uvQR2crZ/zgzSHDvdygHyNI+ze9zwS8mqz0YtGXotSqvEE0UkYE9s+FZKQNTt1VtT719mfP3vHrUdCpxBNQZhQ==", - "cpu": [ - "ppc64" - ], - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.22.0.tgz", - "integrity": "sha512-PBnyP+r8vJE4ifxsWys9l+Mc2UY/yYZOpX82eoyGISXXb3dRr0M21v+s4fgRKWMFPMSf/iyowqPW/u7ScSUkjQ==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.22.0.tgz", - "integrity": "sha512-UKhPb3o2gAB/bfXcl58ZXTn1q2oVu1rEu/bKrCtmm+Nj5MKUbrOwR5WAixE2v+lk0amWuwPvhnPpBRLIGiq7ig==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.22.0.tgz", - "integrity": "sha512-IjTYtvIrjhR41Ijy2dDPgYjQHWG/x/A4KXYbs1fiU3efpRdoxMChK3oEZV6GPzVEzJqxFgcuBaiX1kwEvWUxSw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.22.0.tgz", - "integrity": "sha512-mqt+Go4y9wRvEz81bhKd9RpHsQR1LwU8Xm6jZRUV/xpM7cIQFbFH6wBCLPTNsdELBvfoHeumud7X78jQQJv2TA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.22.0.tgz", - "integrity": "sha512-vTaTQ9OgYc3VTaWtOE5pSuDT6H3d/qSRFRfSBbnxFfzAvYoB3pqKXA0LEbi/oT8GUOEAutspfRMqPj2ezdFaMw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.22.0.tgz", - "integrity": "sha512-0e1ZgoobJzaGnR4reD7I9rYZ7ttqdh1KPvJWnquUoDJhL0rYwdneeLailBzd2/4g/U5p4e5TIHEWa68NF2hFpQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.22.0.tgz", - "integrity": "sha512-BFgyYwlCwRWyPQJtkzqq2p6pJbiiWgp0P9PNf7a5FQ1itKY4czPuOMAlFVItirSmEpRPCeImuwePNScZS0pL5Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.22.0.tgz", - "integrity": "sha512-KEMWiA9aGuPUD4BH5yjlhElLgaRXe+Eri6gKBoDazoPBTo1BXc/e6IW5FcJO9DoL19FBeCxgONyh95hLDNepIg==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.22.0.tgz", - "integrity": "sha512-V/K2rctCUgC0PCXpN7AqT4hoazXKgIYugFGu/myk2+pfe6jTW2guz/TBwq4cZ7ESqusR/IzkcQaBkcjquuBWsw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.22.0.tgz", - "integrity": "sha512-r2ZZqkOMOrpUhzNwxI7uLAHIDwkfeqmTnrv1cjpL/rjllPWszgqmprd/om9oviKXUBpMqHbXmppvjAYgISb26Q==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.22.0.tgz", - "integrity": "sha512-qaowLrV/YOMAL2RfKQ4C/VaDzAuLDuylM2sd/LH+4OFirMl6CuDpRlCq4u49ZBaVV8pkI/Y+hTdiibvQRhojCA==", - "cpu": [ - "loong64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.22.0.tgz", - "integrity": "sha512-hgrezzjQTRxjkQ5k08J6rtZN5PNnkWx/Rz6Kmj9gnsdCAX1I4Dn4ZPqvFRkXo55Q3pnVQJBwbdtrTO7tMGtyVA==", - "cpu": [ - "mips64el" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.22.0.tgz", - "integrity": "sha512-ewxg6FLLUio883XgSjfULEmDl3VPv/TYNnRprVAS3QeGFLdCYdx1tIudBcd7n9jIdk82v1Ajov4jx87qW7h9+g==", - "cpu": [ - "ppc64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.22.0.tgz", - "integrity": "sha512-Az5XbgSJC2lE8XK8pdcutsf9RgdafWdTpUK/+6uaDdfkviw/B4JCwAfh1qVeRWwOohwdsl4ywZrWBNWxwrPLFg==", - "cpu": [ - "riscv64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.22.0.tgz", - "integrity": "sha512-8j4a2ChT9+V34NNNY9c/gMldutaJFmfMacTPq4KfNKwv2fitBCLYjee7c+Vxaha2nUhPK7cXcZpJtJ3+Y7ZdVQ==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.22.0.tgz", - "integrity": "sha512-JUQyOnpbAkkRFOk/AhsEemz5TfWN4FJZxVObUlnlNCbe7QBl61ZNfM4cwBXayQA6laMJMUcqLHaYQHAB6YQ95Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.22.0.tgz", - "integrity": "sha512-11PoCoHXo4HFNbLsXuMB6bpMPWGDiw7xETji6COdJss4SQZLvcgNoeSqWtATRm10Jj1uEHiaIk4N0PiN6x4Fcg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.22.0.tgz", - "integrity": "sha512-Ezlhu/YyITmXwKSB+Zu/QqD7cxrjrpiw85cc0Rbd3AWr2wsgp+dWbWOE8MqHaLW9NKMZvuL0DhbJbvzR7F6Zvg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.22.0.tgz", - "integrity": "sha512-ufjdW5tFJGUjlH9j/5cCE9lrwRffyZh+T4vYvoDKoYsC6IXbwaFeV/ENxeNXcxotF0P8CDzoICXVSbJaGBhkrw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.22.0.tgz", - "integrity": "sha512-zY6ly/AoSmKnmNTowDJsK5ehra153/5ZhqxNLfq9NRsTTltetr+yHHcQ4RW7QDqw4JC8A1uC1YmeSfK9NRcK1w==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.22.0.tgz", - "integrity": "sha512-Kml5F7tv/1Maam0pbbCrvkk9vj046dPej30kFzlhXnhuCtYYBP6FGy/cLbc5yUT1lkZznGLf2OvuvmLjscO5rw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.22.0.tgz", - "integrity": "sha512-IOgwn+mYTM3RrcydP4Og5IpXh+ftN8oF+HELTXSmbWBlujuci4Qa3DTeO+LEErceisI7KUSfEIiX+WOUlpELkw==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.22.0.tgz", - "integrity": "sha512-4bDHJrk2WHBXJPhy1y80X7/5b5iZTZP3LGcKIlAP1J+KqZ4zQAPMLEzftGyjjfcKbA4JDlPt/+2R/F1ZTeRgrw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, "node_modules/@expressive-code/core": { "version": "0.35.6", "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.35.6.tgz", @@ -2268,17 +1897,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/algoliasearch": { "version": "5.17.0", "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.17.0.tgz", @@ -6378,11 +5996,6 @@ "node": ">=4" } }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" - }, "node_modules/preact": { "version": "10.25.1", "resolved": "https://registry.npmjs.org/preact/-/preact-10.25.1.tgz", From e8a4bd056eb8271651efb80ef715ef58c18ec71c Mon Sep 17 00:00:00 2001 From: omckeon Date: Thu, 13 Feb 2025 13:11:07 +0000 Subject: [PATCH 6/8] Test workflow update --- .github/workflows/astro.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/astro.yml b/.github/workflows/astro.yml index dc3581588..9b2d1992d 100644 --- a/.github/workflows/astro.yml +++ b/.github/workflows/astro.yml @@ -21,7 +21,7 @@ jobs: npm install - name: Upload your site uses: withastro/action@v3 - with: + # with: DOCSEARCH_API_ID: ${{ secrets.DOCSEARCH_API_ID }} DOCSEARCH_API_SEARCH_KEY: ${{ secrets.DOCSEARCH_API_SEARCH_KEY }} DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }} From 05f462fe5a860bee2a1668b158f82e32251f711d Mon Sep 17 00:00:00 2001 From: omckeon Date: Thu, 13 Feb 2025 13:13:29 +0000 Subject: [PATCH 7/8] small fix --- .github/workflows/astro.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/astro.yml b/.github/workflows/astro.yml index 9b2d1992d..dc3581588 100644 --- a/.github/workflows/astro.yml +++ b/.github/workflows/astro.yml @@ -21,7 +21,7 @@ jobs: npm install - name: Upload your site uses: withastro/action@v3 - # with: + with: DOCSEARCH_API_ID: ${{ secrets.DOCSEARCH_API_ID }} DOCSEARCH_API_SEARCH_KEY: ${{ secrets.DOCSEARCH_API_SEARCH_KEY }} DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }} From 7b9c92768c92c5ef9d01de07ac021f223f41632a Mon Sep 17 00:00:00 2001 From: omckeon Date: Thu, 13 Feb 2025 13:20:26 +0000 Subject: [PATCH 8/8] Move env variables --- .github/workflows/astro.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/astro.yml b/.github/workflows/astro.yml index dc3581588..bc4c0e5f3 100644 --- a/.github/workflows/astro.yml +++ b/.github/workflows/astro.yml @@ -12,6 +12,10 @@ permissions: jobs: build: + env: + DOCSEARCH_API_ID: ${{ secrets.DOCSEARCH_API_ID }} + DOCSEARCH_API_SEARCH_KEY: ${{ secrets.DOCSEARCH_API_SEARCH_KEY }} + DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }} runs-on: ubuntu-latest steps: - name: Checkout your repository using git @@ -22,9 +26,6 @@ jobs: - name: Upload your site uses: withastro/action@v3 with: - DOCSEARCH_API_ID: ${{ secrets.DOCSEARCH_API_ID }} - DOCSEARCH_API_SEARCH_KEY: ${{ secrets.DOCSEARCH_API_SEARCH_KEY }} - DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }} deploy: needs: build