Skip to content

Latest commit

 

History

History
72 lines (59 loc) · 2.81 KB

File metadata and controls

72 lines (59 loc) · 2.81 KB

post-deploy-smoke

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.

What it catches

  • robots.txt drift — unreachable, not text/plain, or a catch-all Disallow: / 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 noindex on 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 vs www). (SMOKE_ALT_HOST_CATCHALL)

Correctness note

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.

Usage

# 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

Inputs

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.

Outputs

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.