GitHub Action — cache invalidation
When you deploy your site, the cached page intent the agent uses can drift from the live DOM. Stale cache → wrong action plans for visitors. This GitHub Action calls Wholisphere’s invalidation endpoint after every production deploy so cached pages are re-evaluated within minutes of release.
Install
Add to your deploy workflow:
jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: ./deploy.sh - name: Invalidate Wholisphere cache uses: wholisphere/github-action@v1 with: org-key: ${{ secrets.WHOLISPHERE_ORG_KEY }} urls: | https://example.com/checkout https://example.com/account/* reason: "release ${{ github.ref_name }}"Add WHOLISPHERE_ORG_KEY to your repo’s Settings → Secrets and variables → Actions.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
org-key | yes | — | Your organization key (from the dashboard) |
backend-url | no | https://api.wholisphere.ai | Backend base URL |
urls | no | * | Comma- or newline-separated URLs (or globs); * invalidates everything |
reason | no | ”deployed via GitHub Actions” | Free-form note recorded in the audit log |
fail-on-error | no | true | Whether failed invalidation fails the workflow |
Outputs
| Output | Description |
|---|---|
invalidated | Number of URLs/globs submitted |
trace-id | Trace ID — paste into a support ticket if needed |
Other CI providers
The action is a thin wrapper around POST /v1/cache/invalidate. Any CI can hit the endpoint:
curl -X POST https://api.wholisphere.ai/v1/cache/invalidate \ -H 'content-type: application/json' \ -H "x-api-key: $WHOLISPHERE_ORG_KEY" \ -d '{"urls":["*"], "reason":"GitLab pipeline #1234"}'