Re-index Context7 when the docs deploy - #122
Merged
Merged
Conversation
Context7 serves Vee's docs to LLMs and AI editors, indexing docs/_content per context7.json. It refreshes on its own schedule, which means a shipped doc change can sit stale in front of every model using it until that fires -- the same gap the Pages deploy already closes for the human-facing site, left open for the machine-facing one. Runs after the deploy, since re-indexing pages that failed to publish is pointless, and adds context7.json to the workflow's path filter: a rules change has to re-index even when no page moved. A missing CONTEXT7_API_KEY skips rather than fails. The docs deploy is the job that matters, and failing it over an optional third-party index -- on a fork, or before the key is set -- would be the tail wagging the dog. The step says what to do instead. Claude-Session: https://claude.ai/code/session_01Hpit6cxJxkbmRfNu6UJGr5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context7 serves Vee's docs to LLMs and AI editors
(context7.com/navbytes/vee), indexing
docs/_contentpercontext7.json. It refreshes on its own schedule, whichmeans a shipped doc change can sit stale in front of every model using it until
that fires — the library was last indexed a month ago, before everything in
0.3.0.
That is the same gap the Pages deploy already closes for the human-facing site,
left open for the machine-facing one.
What this does
Adds a
context7job to the docs workflow that asks Context7 to re-index aftera successful deploy.
deploy, not beside it — re-indexing pages that failed topublish is pointless.
context7.jsonto the path filter. Itsrulesare part of whatContext7 serves, so changing them has to re-index even when no page moved.
CONTEXT7_API_KEYskips rather than fails. The docs deploy isthe job that matters; failing it over an optional third-party index — on a
fork, or before the key is set — would be the tail wagging the dog. The step
prints what to do instead.
refresh is a request that Context7 queues; if the request itself does not
land, that is worth knowing.
To make it live
The manual dispatch matters: 0.3.0's docs are already merged, so nothing will
push to
docs/**again to fire this naturally.Caveat
The API call (
POST /api/v1/refresh, bearer auth,{"libraryName": "/owner/repo"}) comes from Context7's own integrationdocumentation and has not been executed — there was no key to test it with.
The first real run confirms it, and fails with the HTTP code and response body
if the endpoint has moved.
https://claude.ai/code/session_01Hpit6cxJxkbmRfNu6UJGr5