From 70168772cd86479b5ae323d678ffd736b811d3cd Mon Sep 17 00:00:00 2001 From: Kay Mok Date: Mon, 25 Nov 2024 23:28:35 +0100 Subject: [PATCH] 7: Fix Algolia search crawler to work properly to re-index content (#33) * Update search workflow to trigger on push to this branch and add a step to install homebrew * Use homebrew action to set up homebrew * Use newer checkout action, refactor to use native package manager instead of homebrew * Fix syntax error * Use homebrew again * Update docs for clarity * Remove push event to trigger crawler --- .github/workflows/search.yaml | 4 +++- README.md | 2 +- docusaurus.config.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/search.yaml b/.github/workflows/search.yaml index addea3f6ce..f427d2f4ee 100644 --- a/.github/workflows/search.yaml +++ b/.github/workflows/search.yaml @@ -8,7 +8,9 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master - name: Run Scraper run: | brew install jq diff --git a/README.md b/README.md index 7fda9bbf9c..67e04d9368 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ See https://www.npmjs.com/package/typedoc-plugin-markdown for details. # How to Update search indices with algolia -- Create an .env file with `APPLICATION_ID` and the `API_KEY` (write access). +- Create an .env file with `APPLICATION_ID` and the `API_KEY` (Admin API Key w/ write access, should be kept secret). If you don't have those, one for the Engineering Managers should be able to help you. - Edit config.json file if needed: - Start url from updated website diff --git a/docusaurus.config.js b/docusaurus.config.js index 2a4387f489..da7ea79af1 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -28,7 +28,7 @@ module.exports = { additionalLanguages: ['solidity'], }, algolia: { - apiKey: '32465e2ab6f7554ff014e64c0d92171c', + apiKey: '32465e2ab6f7554ff014e64c0d92171c', // Search-Only API Key (Public & safe to commit) indexName: 'v3-docs', appId: 'S0IDD0YGLZ', },