From 9dea8385e898542a4bdcfc23fb51bf6a04f70373 Mon Sep 17 00:00:00 2001 From: Daniel Helm Date: Sun, 6 Aug 2023 17:14:12 -0500 Subject: [PATCH] name github index action and fix env for index usage --- .github/workflows/update-algolia-index.yml | 4 ++-- src/components/Header/Search/SearchModal.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-algolia-index.yml b/.github/workflows/update-algolia-index.yml index f60423a0a..244dec054 100644 --- a/.github/workflows/update-algolia-index.yml +++ b/.github/workflows/update-algolia-index.yml @@ -5,7 +5,7 @@ on: [push] jobs: update-prod-index: if: ${{ github.ref == 'refs/heads/main' }} - name: Update algolia index + name: Update algolia index -- Prod runs-on: ubuntu-latest env: ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} @@ -26,7 +26,7 @@ jobs: update-dev-index: if: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/sepolia-content-population' }} - name: Update algolia index + name: Update algolia index -- Dev runs-on: ubuntu-latest env: ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} diff --git a/src/components/Header/Search/SearchModal.tsx b/src/components/Header/Search/SearchModal.tsx index 2afbdd4e6..335e32fc6 100644 --- a/src/components/Header/Search/SearchModal.tsx +++ b/src/components/Header/Search/SearchModal.tsx @@ -141,7 +141,7 @@ export function SearchModal({ size = "mini", isOpen, onClose }: { size: Size; is const getIndexName = () => { if (typeof window === "undefined") return const host = window.location.hostname - if (host === "docs.scroll.io" || "docs.scroll.xyz") return CONFIG.ALGOLIA.productionIndexName + if (host === "docs.scroll.io" || host === "docs.scroll.xyz") return CONFIG.ALGOLIA.productionIndexName return CONFIG.ALGOLIA.testIndexName }