diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index ec14b2e20..302f8e855 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -3,6 +3,11 @@ name: CD - production on: push: branches: [ main ] +env: + NEXT_PUBLIC_BASE_PATH: '' + NEXT_PUBLIC_DOCSEARCH_APP_ID: ${{ secrets.NEXT_PUBLIC_DOCSEARCH_APP_ID }} + NEXT_PUBLIC_DOCSEARCH_API_KEY: ${{ secrets.NEXT_PUBLIC_DOCSEARCH_API_KEY }} + NEXT_PUBLIC_DOCSEARCH_INDEX_NAME: ${{ secrets.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME }} jobs: build: diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 57f270b23..887de544c 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -3,6 +3,11 @@ name: CD on: push: branches: [ staging ] +env: + NEXT_PUBLIC_BASE_PATH: '' + NEXT_PUBLIC_DOCSEARCH_APP_ID: ${{ secrets.NEXT_PUBLIC_DOCSEARCH_APP_ID }} + NEXT_PUBLIC_DOCSEARCH_API_KEY: ${{ secrets.NEXT_PUBLIC_DOCSEARCH_API_KEY }} + NEXT_PUBLIC_DOCSEARCH_INDEX_NAME: ${{ secrets.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME }} jobs: build: diff --git a/docusaurus.config.js b/docusaurus.config.js index 608f6f9c2..c1e5dfb1c 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -100,10 +100,10 @@ const config = { }, algolia: { // The application ID provided by Algolia - appId: process.env.NEXT_PUBLIC_DOCSEARCH_APP_ID || 'R2IYF7ETH7', + appId: process.env.NEXT_PUBLIC_DOCSEARCH_APP_ID, // Public API key: it is safe to commit it - apiKey: process.env.NEXT_PUBLIC_DOCSEARCH_API_KEY || '599cec31baffa4868cae4e79f180729b', - indexName: process.env.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME || 'docsearch', + apiKey: process.env.NEXT_PUBLIC_DOCSEARCH_API_KEY, + indexName: process.env.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME, // Optional: see doc section below contextualSearch: true, // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.