CI/CD

CI/CD Guard

Broken SEO should break your build. Add one line to your pipeline.

Installation

bash
npm install -D indxel-ci

GitHub Actions

.github/workflows/seo.ymlyaml
name: SEO Check

on:
  pull_request:
    branches: [main]

jobs:
  seo:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npx indxel-cli check --ci

PR comment

The CI guard automatically posts a comment on the PR with:

  • Overall score and grade
  • Number of pages scanned
  • List of errors (if any)
  • Diff with previous check (if available)

Vercel

Add the check to your Vercel build command.

package.jsonjson
{
  "scripts": {
    "build": "npx indxel-cli check --ci && next build"
  }
}

CLI flags

FlagDefaultDescription
--min-score <score>Any error failsMinimum score to pass (0-100)
--strictOffTreat warnings as errors

Git Pre-Push Hook

Block pushes that contain broken SEO. Install automatically with init --hook:

Install hookbash
npx indxel-cli init --hook

Or manually create .git/hooks/pre-push:

.git/hooks/pre-pushbash
#!/bin/sh
npx indxel-cli check --ci

Configuration

Score threshold

By default, the CI guard fails on any error. To set a minimum score threshold:

bash
# Fail if score is below 80
npx indxel-cli check --ci --min-score 80

# Fail if score is below 90 (strict)
npx indxel-cli check --ci --min-score 90 --strict

Strict mode

In strict mode, warnings are promoted to errors. This means a page with only warnings will still fail the build. Use this for production branches.