Skip to content

Skip draft pages in Lighthouse CI#206

Open
kcmartin wants to merge 1 commit into
mainfrom
fix/lighthouse-skip-drafts
Open

Skip draft pages in Lighthouse CI#206
kcmartin wants to merge 1 commit into
mainfrom
fix/lighthouse-skip-drafts

Conversation

@kcmartin

@kcmartin kcmartin commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Lighthouse job builds its URL list from every .mdx a PR changes, without checking whether the page is a draft. Draft pages (draft: true) are excluded from the production build, so their URLs 404 on the preview deploy and Lighthouse fails the run with ERRORED_DOCUMENT_REQUEST (Status code: 404).

This bit PR #205, which edited the draft reference/configuration.mdx and failed Lighthouse on /reference/configuration/ even though the change was fine.

Fix

In the "Get changed pages" step, read each changed file's frontmatter (the PR head is already checked out) and skip any page with draft: true before adding its URL. Unreadable files fall through and are still tested, so nothing is silently dropped.

Verified locally: draft: true pages are skipped, published pages are still tested, and the workflow YAML still parses.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Preview Deployment

Name URL
Preview https://pr-206-superfly-sprites-docs.fly.dev

Commit: f21f8a4

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Lighthouse Results

URL Performance Accessibility Best Practices SEO
/ 🟢 94 🟢 100 🟢 96 🟢 100

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ Tests success

Ran against: https://pr-206-superfly-sprites-docs.fly.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant