Skip to content

ci: run lighthouse report#1985

Merged
bjohansebas merged 7 commits intoexpressjs:gh-pagesfrom
ShubhamOulkar:add-lighthouse-report
Aug 1, 2025
Merged

ci: run lighthouse report#1985
bjohansebas merged 7 commits intoexpressjs:gh-pagesfrom
ShubhamOulkar:add-lighthouse-report

Conversation

@ShubhamOulkar
Copy link
Copy Markdown
Member

@ShubhamOulkar ShubhamOulkar commented Jul 23, 2025

@ShubhamOulkar ShubhamOulkar requested a review from a team as a code owner July 23, 2025 06:55
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 23, 2025

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 8318d6c
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6889b7e09c09ac0008fe3939
😎 Deploy Preview https://deploy-preview-1985--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ShubhamOulkar ShubhamOulkar force-pushed the add-lighthouse-report branch 3 times, most recently from 066240c to ee5546e Compare July 23, 2025 09:49
@ShubhamOulkar ShubhamOulkar force-pushed the add-lighthouse-report branch from ee5546e to a2d1b75 Compare July 23, 2025 10:01
@UlisesGascon
Copy link
Copy Markdown
Member

Great job @ShubhamOulkar! In the past I’ve used Unlighthouse to generate reports from scratch and upload them to Netlify. We could even set up a secondary project for that. Here's the link I used: https://unlighthouse.dev/integrations/ci#github-actions-netlify-example

Your approach looks really solid as well. Nice work! 👍

@bjohansebas
Copy link
Copy Markdown
Member

I have my doubts about how important it really is to have Lighthouse, but I think we could give it a try. What I would like, and this would be a requirement for me to accept it, is that the report can be commented on the issue. As it stands, no one would notice that the report is being generated, and if no one sees it, then what’s the point of generating it? Making it accessible would be important.

i used Unlighthouse to generate reports from scratch and upload them to Netlify

I’d prefer not to rely too much on Netlify, but if this tool works independently of where the preview is generated, it would be fine with me too.

@ShubhamOulkar
Copy link
Copy Markdown
Member Author

ShubhamOulkar commented Jul 23, 2025

the report can be commented on the issue. As it stands, no one would notice that the report is being generated, and if no one sees it, then what’s the point of generating it? Making it accessible would be important.

I tried commenting report on PR in #1984. But it keep hitting 403 error denial of access
I don't think it is inaccessible, because we know where results are.

https://unlighthouse.dev/integrations/ci#github-actions-netlify-example

If this tool provide ous correct SEO results then I am +1 on this. I will try this tool.

@bjohansebas
Copy link
Copy Markdown
Member

I tried commenting report on PR in #1984. But it keep hitting 403 error denial of access

That was a permissions issue with the actions I can help you with that if you’d like

I don't think it is inaccessible, because we know where results are.

Yes, but not really, keep in mind that not everyone is keeping an eye on the workflows, and a comment would make them more visible. On the other hand, if the comment isn't added in regular PRs, it could easily be missed, which defeats the purpose. Having to dig into the workflow and check the results takes time, so people might just skip it, something that a simple comment would solve. That’s why the comment is almost essential.

@ShubhamOulkar
Copy link
Copy Markdown
Member Author

Should we override X-Robots-Tag: noindex in Netlify preview?

netlify preview SEO blocker results actual expressjs.com SEO results
image image

@ShubhamOulkar ShubhamOulkar mentioned this pull request Jul 27, 2025
Comment thread .github/workflows/lighthouse.yml
Copy link
Copy Markdown
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don’t understand why the workflow isn’t running, it didn’t run for #1988 either when it was using pull_request_target. It only ran when switched to pull_request.

@ShubhamOulkar
Copy link
Copy Markdown
Member Author

ShubhamOulkar commented Jul 29, 2025

I still don’t understand why the workflow isn’t running, it didn’t run for #1988 either when it was using pull_request_target. It only ran when switched to pull_request.

see GITHUB_REF for pull_request in the table

see GITHUB_REF for pull_request_target. To trigger the action on PR for pull_request_target we need ref of base branch. So we need to add workflow on base branch then only it will trigger on each new PR.

You can refer from this repo

@ShubhamOulkar
Copy link
Copy Markdown
Member Author

Hi @UlisesGascon, I tried unlighthouse in #1990 but got same SEO results. This does not bypass #1985 (comment).

Should we do this in Netlify? https://docs.netlify.com/manage/monitoring/lighthouse/#set-up-embedded-lighthouse-scores-and-reports-for-your-site.

Copy link
Copy Markdown
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, sorry for the delay

@bjohansebas bjohansebas merged commit c75ec31 into expressjs:gh-pages Aug 1, 2025
12 checks passed
@ShubhamOulkar ShubhamOulkar deleted the add-lighthouse-report branch August 2, 2025 11:32
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.

3 participants