Skip to content

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:

.github/workflows/deploy.yml
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

InputRequiredDefaultDescription
org-keyyesYour organization key (from the dashboard)
backend-urlnohttps://api.wholisphere.aiBackend base URL
urlsno*Comma- or newline-separated URLs (or globs); * invalidates everything
reasonno”deployed via GitHub Actions”Free-form note recorded in the audit log
fail-on-errornotrueWhether failed invalidation fails the workflow

Outputs

OutputDescription
invalidatedNumber of URLs/globs submitted
trace-idTrace 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:

Terminal window
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"}'