SEO deploy gate that runs against production, after the deploy — because the build artifact can be perfect while production drifts.
The other gates check your build. This one checks what your origin + CDN
actually serve: a stripped header, wrong host routing, or a noindex
leaked from a preview environment only shows up here.
- robots.txt drift — unreachable, not
text/plain, or a catch-allDisallow: /for Googlebot evaluated with a real parser (a catch-all hidden under a specific user-agent group is still caught). (SMOKE_ROBOTS_UNREACHABLE,SMOKE_ROBOTS_CONTENT_TYPE,SMOKE_ROBOTS_CATCHALL) - robots.txt content drift — body sha256 ≠
expected-hash. (SMOKE_ROBOTS_HASH) - Wrong status on a critical URL. (
SMOKE_URL_STATUS) - Leaked
noindexon an indexable URL (header or meta). (SMOKE_NOINDEX) - Indexable URL blocked by robots in production.
(
SMOKE_ROBOTS_BLOCKED) - Canonical pointing at a staging/preview host — the preview env leaked.
(
SMOKE_CANONICAL_STAGING,SMOKE_CANONICAL_HOST) - Multi-host drift via
also-check(e.g. apex vswww). (SMOKE_ALT_HOST_CATCHALL)
The "no catch-all Disallow" check uses a real robots parser, not grep —
a Disallow: / may sit under a specific user-agent group rather than *, and
a naive grep would both miss that and false-positive on Disallow: /admin.
# after your deploy step, against the live site:
- uses: nimajafari/seo-ci/actions/post-deploy-smoke@v1
with:
base-url: https://www.example.com
urls: |
/
/products/flagship-widget
/blog/launch-post
expected-hash: ${{ vars.ROBOTS_SHA256 }}
also-check: |
https://example.com # apex should redirect/serve consistently| Input | Default | Description |
|---|---|---|
base-url |
— (required) | Production base URL. |
urls |
"" |
Critical URLs (url or url -> status), relative or absolute. |
expected-hash |
"" |
Expected sha256 (hex) of production robots.txt. |
also-check |
"" |
Alternate host base URLs to check for a robots catch-all. |
user-agent |
Googlebot |
Agent to evaluate as. |
strict |
false |
Treat warnings as errors. |
report-path |
"" |
Write the JSON report to this path. |
passed, errors, warnings, notices, report — see the
top-level README.
Caveat: A starting point, not a drop-in guarantee. Your critical URL set, canonical host, and indexable rules are specific to your site. To use
expected-hash, record the sha256 of your intended robots.txt and store it as a repo variable. Never serve crawlers different content than users — cloaking violates Google's policies.