Automatic re-indexing

We automatically re-index all content every 24 hours. We calculate differences in content and update all downstream dependencies as needed.

Update with a webhook call

To update content on-demand, you can make an API call to our management service that will trigger a source synchronization job. This is useful for content that has a CI/CD pipeline or for CMS systems that offer webhooks when content changes. Contact us for a management API key and guidance on how to set this up.

Update with a GitHub Action

You can set up a GitHub Action workflow to automatically trigger Inkeep to re-crawl a source that corresponds to a (public or private) GitHub repo. This way of triggering indexing is possible for publicly available web content managed via Git, like documentation or marketing sites.

1

Add the Inkeep API key

  1. Get an Inkeep Management API key by contacting help@inkeep.com.
  2. Under your repository settings, navigate to Secrets and variables -> Actions. Click on New repository secret and add your Inkeep API key with the name INKEEP_API_KEY.
2

Get the Source ID

  1. Go to the Inkeep Dashboard
  2. Navigate to Sources
  3. Selecting the source and copy the ID.
3

Create the Workflow

  1. In your GitHub repository, navigate to the Actions tab and click on New workflow.

  2. Choose the Set up a workflow yourself option.

  3. Insert the below into the workflow file:

name: Sync Inkeep Source

on:
  push:
    branches:
      - main

jobs:
  syncSourceJob:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write

    steps:
    - name: Checkout
      uses: actions/checkout@v3
      
    - name: Sync Source
      uses: inkeep/pr-commenter-action@v10
      env:
        GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
      with:
        apiKey: ${{secrets.INKEEP_API_KEY}}
        sourceId: "{SOURCE_ID}"
  1. Replace {SOURCE_ID} with the ID of your Inkeep source.

  2. Commit the workflow file to your repository.

How it Works

  • The workflow is triggered whenever changes are pushed to the main branch and there are changes in the matching paths. Note that this only happens when a PR is merged or push is made to the target branch.

  • If the push to main is associated with a pull request, a comment will be added to the PR confirming that an ingestion job was triggered:

    :mag_right: :speech_balloon: Inkeep AI search and chat service is syncing content for source ‘{Source-Name}’

  • The new content will be ingested within 1 hour.

Permissions

PermissionReason
contents: readAllows the workflow to read the content of the repository, which is needed to detect changes in the content.
pull-requests: writeAllows the workflow to write a comment on the PR when the workflow succeeds. Note that this only happens once the PR is merged to the target branch.