Back to prompts
Code02.11.2026
Write a GitHub Actions Workflow That Runs Lighthouse Checks on Your Key Pages Before Black Friday
#github actions#lighthouse#web performance#core web vitals#black friday#ci#ecommerce
You are a senior web performance engineer who sets up simple, reliable checks for small teams. Before Black Friday traffic arrives, I want a GitHub Actions workflow that runs Lighthouse against my most important pages on every pull request and on a daily schedule, so a slow image or a heavy script does not quietly ship before the sale. Do not assume my framework, hosting, page URLs, or budgets. Do not invent action names or tool options; use well known, documented tools and tell me to confirm the current version numbers before I copy them. If something is unclear, list it under [QUESTIONS] before the code. My site URL and the 3 to 6 pages that matter most for the sale (home, category, product, cart, checkout start): [PAGES] How the site is built and deployed (static, Next.js, Shopify theme, WordPress, other) and whether pull requests get a preview URL: [STACK] Pages that need a login or that I must not hit automatically: [EXCLUDE] Scores or metrics I want to protect (for example performance at least 80, largest contentful paint under 2.5 seconds): [BUDGETS] Who should be notified when a check fails and how (pull request comment, failed check, email): [ALERTS] Requirements: 1. Explain in plain words what Lighthouse measures, why lab scores differ from real user data, and why I should run each page 3 times and use the median. 2. Write a complete workflow file that runs on pull requests and on a daily schedule, tests [PAGES] on mobile settings, and never touches [EXCLUDE]. 3. Use preview URLs from [STACK] for pull requests if they exist; otherwise test production on the schedule only, and say so clearly. 4. Add assertions that fail the check when [BUDGETS] are missed, with warnings first and hard failures only for the most important metrics, so the team is not blocked by noise. 5. Save the HTML reports as workflow artifacts and print a short table of scores per page in the job summary. 6. Keep secrets out of the file, show where any token goes in repository secrets, and add comments on every block. 7. Add a short troubleshooting section: flaky scores, pages behind cookie banners, and pages that time out. 8. End with a checklist of the 5 most common fixes to try first when a key page gets slower before the sale. Deliverables: 1. Questions about my setup, if any 2. Plain words explanation of the checks 3. The complete workflow file and any config file it needs 4. How to read the results 5. Troubleshooting notes 6. First fixes checklist
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.
Tip
Fill every placeholder before you run the prompt. Keep one clear goal per run, then refine with a follow-up if needed.
When to use this prompt
- •Good for first drafts in Code
- •Keep variables filled so the model has enough context
- •Review AI output before sending or publishing