Updating content
How content is kept up to date for any source
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 Inkeep’s 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.
Add the Inkeep API key
- Get an Inkeep Management API key by contacting help@inkeep.com.
- 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
.
Get the Source ID
- Go to the Inkeep Dashboard
- Navigate to Sources
- Selecting the source and copy the
ID
.
Create the Workflow
-
In your GitHub repository, navigate to the Actions tab and click on New workflow.
-
Choose the Set up a workflow yourself option.
-
Insert the below into the workflow file:
-
Replace
{SOURCE_ID}
with the ID of your Inkeep source. -
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
Permission | Reason |
---|---|
contents: read | Allows the workflow to read the content of the repository, which is needed to detect changes in the content. |
pull-requests: write | Allows 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. |