Skip to content

Commit

Permalink
name github index action and fix env for index usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dghelm committed Aug 6, 2023
1 parent 6580ce6 commit 9dea838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-algolia-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Search/SearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 9dea838

Please sign in to comment.