Skip to content

Conversation

chewong
Copy link
Collaborator

@chewong chewong commented Jul 23, 2025

Reason for Change:

Adding search functionality to our website by following https://docusaurus.io/docs/search#using-algolia-docsearch

image image

Added the new secrets as repository secrets

image

Requirements

  • added unit tests and e2e tests (if applicable).

Issue Fixed:

Fixes #1197
Fixes #1206

Notes for Reviewers:

Signed-off-by: Ernest Wong <chwong719@gmail.com>
Copy link

Title

Add Algolia search to website


Description

  • Added Algolia search functionality to the website

  • Configured environment variables for Algolia in CI/CD pipeline


Changes walkthrough 📝

Relevant files
Enhancement
docusaurus.config.js
Add Algolia search configuration                                                 

website/docusaurus.config.js

  • Added Algolia configuration to docusaurus.config.js
  • Included environment variables for Algolia app ID and API key
  • +6/-0     
    deploy-docs.yml
    Set Algolia environment variables in CI/CD                             

    .github/workflows/deploy-docs.yml

  • Added environment variables for Algolia app ID and API key in
    deploy-docs.yml
  • +3/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 Security concerns

    Sensitive information exposure:
    The use of environment variables for ALGOLIA_APP_ID and ALGOLIA_API_KEY is correct, but ensure these secrets are not logged or exposed in any way during the build or deployment process.

    ⚡ Recommended focus areas for review

    Default Values

    The default values for ALGOLIA_APP_ID and ALGOLIA_API_KEY are set to "DUMMY_APP_ID" and "DUMMY_API_KEY". These should be removed or replaced with actual values before deployment to avoid potential issues.

    appId: process.env.ALGOLIA_APP_ID || "DUMMY_APP_ID",
    apiKey: process.env.ALGOLIA_API_KEY || "DUMMY_API_KEY",
    Secret Usage

    Ensure that the secrets ALGOLIA_APP_ID and ALGOLIA_API_KEY are correctly set in the repository settings and are not exposed in any logs or outputs.

    ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
    ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}

    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Security
    Remove dummy API keys

    Remove hardcoded dummy values for appId and apiKey to prevent accidental exposure.

    website/docusaurus.config.js [128-133]

     algolia: {
    -    appId: process.env.ALGOLIA_APP_ID || "DUMMY_APP_ID",
    -    apiKey: process.env.ALGOLIA_API_KEY || "DUMMY_API_KEY",
    +    appId: process.env.ALGOLIA_APP_ID,
    +    apiKey: process.env.ALGOLIA_API_KEY,
         indexName: 'KAITO',
         contextualSearch: true,
     }
    Suggestion importance[1-10]: 8

    __

    Why: Removing hardcoded dummy values enhances security by preventing accidental exposure of sensitive information.

    Medium
    Possible issue
    Verify GitHub Secrets

    Ensure that ALGOLIA_APP_ID and ALGOLIA_API_KEY are correctly set in GitHub Secrets
    to avoid deployment issues.

    .github/workflows/deploy-docs.yml [60-62]

    +env:
    +  ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
    +  ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
     
    -
    Suggestion importance[1-10]: 6

    __

    Why: Ensuring that ALGOLIA_APP_ID and ALGOLIA_API_KEY are correctly set in GitHub Secrets helps avoid deployment issues, but this is more of a verification step rather than a code change.

    Low

    @chewong chewong merged commit 03d8665 into kaito-project:main Jul 24, 2025
    16 of 18 checks passed
    @chewong chewong deleted the fix-1197 branch July 24, 2025 01:45
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: Done
    Development

    Successfully merging this pull request may close these issues.

    Improve KAITO onboarding experience docs: add search to website
    2 participants