lighthouse-action
lighthouse-action copied to clipboard
Feature request: include web server
It would be super handy if this package could also include a super simple web server.
Currently, we're building a Vue app, but there is no way to have the dist/index.html audited, since there is no webserver.
We're currently using Netlify, but the action runs faster then Netlify can deploy, so it fails (when the action runs, Netlify has not yet finished deploying the preview, meaning a 404 response).
If the package could also have a path option, one could simply point to the directory of static html files and have this action start a simple webserver and audit against that.
Hi there, apologies for the late reply!
This crossed my mind too and I'll look into the best way to do this — maybe a simple one-line Python server like python -m SimpleHTTPServer 8000 would suffice. As for the Netlify race condition, this is at the top of my to-do list (also discussed in #14) since this is likely a problem in 99% of use cases. I'll keep you posted, thanks for reaching out!
We would also love to use this with a local server.
Use Case: next.js server
Steps:
yarn buildyarn start(never finishes since the server is running)- run lighthouse action
Thanks in advance
Perhaps this package could be of use? https://github.com/marketplace/actions/http-server-action