diff --git a/.github/workflows/context7-refresh.yml b/.github/workflows/context7-refresh.yml new file mode 100644 index 0000000..a112ed8 --- /dev/null +++ b/.github/workflows/context7-refresh.yml @@ -0,0 +1,30 @@ +name: Context7 refresh + +on: + push: + branches: + - main + paths: + - "README.md" + - "context7.json" + - "docs/**" + - "examples/**" + +permissions: + contents: read + +jobs: + refresh: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Trigger a Context7 refresh + env: + CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY }} + LIBRARY_NAME: /${{ github.repository }} + run: | + curl --fail --silent --show-error --max-time 60 \ + -X POST https://context7.com/api/v1/refresh \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $CONTEXT7_API_KEY" \ + -d "{\"libraryName\": \"$LIBRARY_NAME\"}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 451debf..06f5586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +- Claim the Context7 library: `context7.json` now carries the library `url` and + the maintainer `public_key`. +- Add the Context7 refresh workflow. A push to `main` that changes the README, + `context7.json`, `docs/`, or `examples/` asks Context7 to refresh the index. + It uses the `CONTEXT7_API_KEY` repository secret. + ## 0.17.1 - 2026-10-08 - Check holds with `Object.hasOwn` in the README and guide ticket sale diff --git a/context7.json b/context7.json index 7c7ef58..f834012 100644 --- a/context7.json +++ b/context7.json @@ -1,5 +1,7 @@ { "$schema": "https://context7.com/schema/context7.json", + "url": "https://context7.com/cardmagic/solid-objects-js", + "public_key": "pk_veEo2smPvGYMwP1MncN1A", "projectTitle": "Solid Objects for TypeScript and Node.js (solid-objects)", "description": "SQL-backed virtual actor library for TypeScript and Node.js. Actors have stable identities, durable JSON state in SQLite, PostgreSQL, or MySQL, ordered per-identity mailboxes, fenced activation, durable reminders, and transactional effects. Requires Node.js 24.4+; ESM only.", "folders": ["docs", "examples"], diff --git a/docs/releasing.md b/docs/releasing.md index e9d1055..5338466 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -60,5 +60,6 @@ npm already holds, it still creates a missing release. After the tag publishes, refresh the solidobjects.dev documentation snapshot from the tag and redeploy the site. The site's `check:release` step refuses a -snapshot that is not the latest published tag. Then trigger a Context7 refresh -for this repository. +snapshot that is not the latest published tag. The Context7 refresh workflow +refreshes the index after each push to `main` that changes the documentation. +Confirm that its run succeeded.