CI/CD
CI/CD Guard
Broken SEO should break your build. Add one line to your pipeline.
Installation
bash
npm install -D indxel-ciGitHub 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 --ciPR 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"
}
}Environment variables
| Variable | Default | Description |
|---|---|---|
| INDXEL_THRESHOLD | 80 | Minimum score to pass (0-100) |
| INDXEL_STRICT | false | Treat warnings as errors |
Git Pre-Push Hook
Block pushes that contain broken SEO. Install automatically with init --hook:
Install hookbash
npx indxel-cli init --hookOr manually create .git/hooks/pre-push:
.git/hooks/pre-pushbash
#!/bin/sh
npx indxel-cli check --ciConfiguration
Score threshold
By default, the CI guard fails on any error. To set a minimum score threshold:
bash
# Fail if score is below 80
INDXEL_THRESHOLD=80 npx indxel-cli check --ci
# Fail if score is below 90 (strict)
INDXEL_THRESHOLD=90 INDXEL_STRICT=true npx indxel-cli check --ciStrict 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.