You can use GitHub Actions to trigger indexing after any deployment or push event. This is useful if you are using a hosting provider that doesn't support outgoing webhooks directly, or if you want to control exactly when indexing happens.
INDEXY_WEBHOOK_URL Create a file named .github/workflows/indexy.yml in your repository.
If you are using Vercel or Netlify integration for GitHub, they send a deployment_status event.
name: Trigger indexy.dev
on: [deployment_status]
jobs:
index:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- name: Trigger Indexing
run: curl -X POST ${{ secrets.INDEXY_WEBHOOK_URL }}If you deploy directly from GitHub Actions, you can add this step at the end of your deployment job.
name: Deploy and Index
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# ... Your deployment steps here ...
- name: Trigger indexy.dev
if: success()
run: curl -X POST ${{ secrets.INDEXY_WEBHOOK_URL }}