Save the workflow as .github/workflows/website-regression.yml. Set STAGING_SITEMAP to the live sitemap served by the WordPress site or its SEO plugin. Use the staging sitemap when it carries the route inventory you want to check. To catch routes missing from staging, use the production sitemap as the inventory and keep STAGING_ORIGIN set to staging. WordPress core commonly serves /wp-sitemap.xml and SEO plugins may serve a sitemap index at /sitemap_index.xml. sireg follows its nested sitemaps.
Set STAGING_ORIGIN to the staging scheme and hostname, with a port if needed. Keep the same route paths on staging and in the sitemap. The example uses a staging site reachable from the GitHub runner.
After the workflow is on your default branch and the host finishes refreshing or deploying staging, open the workflow in GitHub Actions and click Run workflow. Shared staging can change between runs. It can only verify a specific PR if your host associates the staging deployment with that PR’s commit.
name: WordPress staging regression
on: [workflow_dispatch]
permissions:
contents: read
env:
STAGING_SITEMAP: https://staging.example.com/wp-sitemap.xml
STAGING_ORIGIN: https://staging.example.com
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Check staging routes
run: |
npx --yes sireg@1.1.0 check \
--sitemap "$STAGING_SITEMAP" \
--origin "$STAGING_ORIGIN" \
--strategy random --limit 25 --seed "wordpress-staging" \
--expect-status 200 --max-redirects 0 \
--report console --html reports/sireg.html
- uses: actions/upload-artifact@v4
if: always()
with:
name: sireg-report
path: reports/sireg.html
if-no-files-found: ignore
See coverage and committed suites for full runs and artifact settings.