Skip to content

tomdye/vercel-lighthouse-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vercel-lighthouse-action

🚦⚡️⏱ Automated Vercel Deployment and Lighthouse Audit with budget assertions using Github Actions.

This Repo builds on https://github.com/OskarAhl/Lighthouse-github-action-comment.

The complete action can be found in vercel-lighthouse-action/workflows/pr-deploy-and-audit.

An example budget can be found in vercel-lighthouse-action/lighthouse/budget.

Alt Text Alt Text Alt Text

Usage

Move the workflows and lighthouse directories into your repository .github directory. Generate and save the required secrets in your github repository settings.

Action workflow

  1. Deploy the PR using vercel-action
  2. Run three lighthouse audits against the vercel preview url
  3. Run budget assertions against the median run
  4. Format the score and comment on PR
  5. Format the assertions / budget result and comment on PR
  6. Pass / Fail the PR based on the budget

Integrations used:

Required Github Secrets:

For this to run, you will need to generate auth tokens and save them as secrets on your repository. Please see the vercel project linking documentation for information on generating org_id and project_id.

  • VERCEL_TOKEN - A vercel auth token
  • ORG_ID - The linked vercel project org id
  • PROJECT_ID - The links vercel project id
  • VERCEL_SCOPE (optional) - The vercel team name if using vercel teams

About

Vercel lighthouse audit github action

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published