GitHub Actions Integration

Trigger indexing automatically using GitHub Actions.

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.

Prerequisite
Make sure you have created a project in indexy.dev and copied your Webhook URL.

1. Add Webhook URL Secret

  1. Go to your GitHub repository Settings.
  2. Navigate to Secrets and variables > Actions.
  3. Click New repository secret.
  4. Name: INDEXY_WEBHOOK_URL
  5. Value: Paste your indexy.dev Webhook URL.
  6. Click Add secret.

2. Create Workflow File

Create a file named .github/workflows/indexy.yml in your repository.

Option A: Trigger after Vercel/Netlify Deployment

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 }}

Option B: Trigger after Push to Main

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 }}