Run SEO & AEO Checks in CI with GitHub Actions

Run SEO & AEO Checks in CI with GitHub Actions

Rank Prompt 3 min read

Most SEO problems ship in a normal pull request: a title gets shortened, a noindex sneaks in, structured data breaks, an og:image goes missing. You find out weeks later, in a ranking report. The fix is to check the page the same way you check your tests, on every push.

Rank Prompt exposes a public page-audit API (POST /v1/page-audit) that scores a single page against SEO and AEO (Answer Engine Optimization) best practices and returns concrete, ordered fixes. Wire it into GitHub Actions and each PR gets a score and a fix list as a comment, and you can fail the build when a page drops below a threshold.

What gets checked

Each audit returns a 0-100 score, a pass/fail flag, and recommendations across:

  • Meta - <title> and meta description length, image alt-text coverage.
  • Headings - exactly one <h1>.
  • Structured data - Schema.org JSON-LD presence and validity.
  • Social - Open Graph and Twitter Card tags.
  • Indexability - canonical tag, robots.txt, XML sitemap, and accidental noindex.
  • AEO - AI-bot access in robots.txt, /llms.txt, and content freshness (dateModified).
  • Security - HTTPS with a valid certificate.

The fastest setup: let your AI do it

If you use Claude Code, Cursor, or any coding agent, you don’t have to hand-write the workflow. In the Rank Prompt app, open Developers -> SEO in CI and copy the setup prompt. Paste it into your AI inside your website repo and it downloads the workflow, sets your page URLs, and opens a PR:

Set up the Rank Prompt SEO/AEO check GitHub Action in this repo:
download the workflow into .github/workflows/rankprompt-seo-check.yml,
set AUDIT_URLS to my key pages, and tell me to add the RANKPROMPT_API_KEY secret.

Or add the workflow yourself

name: Rank Prompt SEO Check
on:
  pull_request:
    branches: [main]
permissions:
  contents: read
  pull-requests: write
jobs:
  seo-check:
    runs-on: ubuntu-latest
    env:
      AUDIT_URLS: "https://example.com https://example.com/pricing"
      FAIL_BELOW: "70"
      RANKPROMPT_API_BASE: "https://api.rankprompt.com"
    steps:
      - name: Audit pages
        env:
          RANKPROMPT_API_KEY: ${{ secrets.RANKPROMPT_API_KEY }}
        run: |
          urls=$(printf '%s' "$AUDIT_URLS" | jq -R 'split(" ")')
          curl -sS -X POST "$RANKPROMPT_API_BASE/v1/page-audit" \
            -H "Authorization: Bearer $RANKPROMPT_API_KEY" \
            -H "Content-Type: application/json" \
            -H "Idempotency-Key: gh-${GITHUB_RUN_ID}" \
            -d "$(jq -n --argjson urls "$urls" '{urls: $urls}')"

Setup is three steps: mint an API key with the read:audit scope, add it as a repository secret named RANKPROMPT_API_KEY, and list your pages in AUDIT_URLS. Each audited page costs 1 credit, and a page that can’t be fetched is refunded automatically.

Auditing a whole site at once

The same endpoint takes one url, a list of urls, or a sitemap. Pass a sitemap (or several URLs) and it audits them in a single call, fetching the domain-level checks (robots, sitemap, llms.txt, SSL) once instead of per page.

curl -sS -X POST "https://api.rankprompt.com/v1/page-audit" \
  -H "Authorization: Bearer $RANKPROMPT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: site-audit-1" \
  -d '{"sitemap": "https://example.com/sitemap.xml", "limit": 10}'

You only pay for pages that audit successfully, and the response includes credits_charged so the cost is never a surprise.

Why AEO belongs in CI

Traditional SEO linters check tags. The Rank Prompt audit also checks the things that decide whether AI assistants can read and cite you: AI-bot access in robots.txt, an /llms.txt manifest, valid structured data, and dated, fresh content. Catching those in the PR that introduces them is far cheaper than discovering, a month later, that ChatGPT stopped mentioning your brand.

Add the check once, and every future change to your site is measured against it before it ships.

Discuss this article with AI

Jump to ChatGPT, Perplexity, or others with a suggested question about this article

Rank Prompt

Rank Prompt

AI visibility tracking platform. Monitor your brand across ChatGPT, Gemini, Claude, Perplexity, and Google AI Mode (AI Overviews).

See how your brand shows up in AI search

Track your visibility across ChatGPT, Gemini, Perplexity, Claude, and Google AI Mode (AI Overviews). Start with a free scan.

Try Rank Prompt free

Stay ahead of AI search

Get weekly insights on AI visibility, answer engine optimization, and brand monitoring strategies.

No spam. Unsubscribe anytime.