Automating Google
Lighthouse
Hamlet Batista // RankSense
SLIDESHARE.NET/HAMLETBATISTA
@hamletbatista
2 October | Brighton Centre | 10 Years of brightonSEO
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
YESSSS!
This Photo by Unknown Author is licensed under CC BY-NC-ND
THE NEXT
DAY...
This Photo by Unknown Author is licensed under CC BY-SA
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
HOW CAN WE
AVOID THIS?
Automating Google Lighthouse
AGENDA
HERE IS WHAT WE ARE GOING TO DO:
• Set up a test Gatsby site and deploy it to Netlify
• Set up a Github repository for the site
• Add Github Action to run Lighthouse CI automatically
when new changes are published
• Set up performance budgets to halt deployment to
production if changes lower page speed performance
• Set up a LightHouse CI server to host the reports and to
visualize changes overtime
GATSBY
ECOMMERCE
EXAMPLE
Setting up Gastby with
an ecommerce template site
Automating Google Lighthouse
Automating Google Lighthouse
npm install -g gatsby-cli
LET’S USE A STARTER SITE FROM
https://www.gatsbyjs.org/starters/?v=2
Automating Google Lighthouse
STATIC SITE GENERATION
GIT WORKFLOW INTEGRATION
https://www.netlifycms.org/
OUR CMS IS
NETLIFY CMS
gatsby new gatsby-starter-netlify-cms https://github.com/netlify-
templates/gatsby-starter-netlify-cms
cd gatsby-starter-netlify-cms
gatsby develop
SET UP GITHUB CONNECTION
git config --global user.email hamletb@ranksense.com
git config --global user.name ”Hamlet Batista”
GATSBY AND
NETLIFY CMS
SUMMARY GATSBY RUNS PAGES REALLY
FAST THANKS TO STATIC SITE
GENERATION
NETLIFY CMS PROVIDES A UI TO
ALLOW FOR REGULAR CHANGES
IN A GIT WORKFLOW
GITHUB AND
NETLIFY
Setting up a Github repo to host the
source code of the site
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
Automating Google Lighthouse
GITHUB AND
NETLIFY
SUMMARY GITHUB NOTIFIES NETLIFY OF
CHANGES IN THE REPO
THROUGH WEBHOOKS
NETLIFY DEPLOYS CHANGES TO
THEIR CDN ONCE IT RECEIVES
THE NOTIFICATIONS
LIGHTHOUSE CI
AND GITHUB
Setting up Lighthouse CI
as a Github Action
Automating Google Lighthouse
• COMMAND LINE TOOL
• SERVER WITH STORAGE AND REPORTING UI
https://github.com/GoogleChrome/lighthouse-ci
LIGHTHOUSE CI
USE CASES
Get a Lighthouse report alongside every pull request.
Prevent regressions in accessibility, SEO, offline support, and performance best practices.
Track performance metrics and Lighthouse scores over time.
Set and keep performance budgets on scripts and images.
Run Lighthouse many times to reduce variance.
Compare two versions of your site to find improvements and regressions of individual resources.
Automating Google Lighthouse
TOO
SLOW
Automating Google Lighthouse
Automating Google Lighthouse
ADDING THE
LIGHTHOUSE
CI ACTION TO
THE REPO
git clone https://github.com/hamletbatista/gatsby-
starter-netlify-cms.git
cd gatsby-starter-netlify-cms
mkdir .github/workflows/
cd .github/workflows/
Adding the Lighthouse CI
Action to the repo (cont.)
• This is the file
.github/workflows/main.yml
• This is all we need to create a test
action
• I left the test URLs in the example.
We will change them later
Adding the Lighthouse CI
Action to the repo (cont.)
• git add .
• git commit -m "added LHCI action"
• git push origin master
Automating Google Lighthouse
LIGHTHOUSE
AND GITHUB
SUMMARY LIGHTHOUSE CI CAN CHECK URLS
FROM THE COMMAND LINE AND
GENERATE REPORTS ON DEMAND
LHCI GITHUB ACTION ALLOWS US TO
RUN LHCI ON COMMITS TO THE REPO
PERFORMANCE
BUDGETS
Setting up Lighthouse
CI performance budgets
Automating Google Lighthouse
Automating Google Lighthouse
ADDING A
PERFORMAN
CE BUDGET
ADDING A
PERFORMANCE
BUDGET (CONT.)
Adding a performance
budget (cont.) • git add ../../budget.json
• git commit -
m ”added budget.json to home dir”
• git push origin master
Automating Google Lighthouse
PERFORMANCE
BUDGETS
SUMMARY LIGHTHOUSE SUPPORTS BUDGETS TO
PREVENT REGRESSIONS
WHEN BUDGETS ARE EXCEEDED, THE
BUILD STOPS AND PREVENTS
DEPLOYMENT
LIGHTHOUSE CI
SERVER
Setting up Lighthouse CI server with a
Postgres backend to host the reports
Automating Google Lighthouse
Setting up the
Lighthouse CI Server
• npm install -D @lhci/cli @lhci/server
SETTING
UP THE
LIGHTHOUSE
CI SERVER
(CONT.)
SETTING UP
POSTGRES
• Create an instance
• Set up user and password
• Create a database named lighthouse
• Find your LHCI server P using:
curl ifconfig.co
• In Connections, add this IP to whitelist it.
For example, 35.196.34.79/32
CREATE A
POSTGRES
CONNECTION
URL
For example:
postgres://postgres:<password>@<IP
of database instance>/lighthouse
This will allow the LHCI Server to
persist the reports to the database
we created
STARTING
THE LHCI
SERVER
First, we need to install the Postgres driver for Node using:
npm install -g pg
lhci server --storage.sqlDialect=postgres --
storage.sqlConnectionUrl="postgres://postgres:<password>@<DB
IP>/lighthouse”
We get “Server listening on port 9001”
STARTING
THE LHCI
SERVER
First, we need to install the Postgres driver for Node using:
npm install -g pg
lhci server --storage.sqlDialect=postgres --
storage.sqlConnectionUrl="postgres://postgres:<password>@<DB
IP>/lighthouse”
We get “Server listening on port 9001”
First time we run it we get this screen
Initialize the LHCI
Server
• lhci wizard
LIGHTHOUSE
CI SERVER AND
POSTGRES
SUMMARY LHCI SERVER CAN PERSIST
REPORTS TO A DATABASE
WE CHOOSE POSTGRES WHICH ALLOWS
US TO CONNECT DIRECTLY FROM DATA
STUDIO LATER
SENDING REPORTS
TO LHCI SERVER
Setting up our LHCI Github Action to upload
reports to the LHCI Server on every push
Automating Google Lighthouse
Updating our workflow
definition
• We add three lines to replace the
temporary storage
• upload.serverBaseUrl: ${{
secrets.LHCI_SERVER }}
• upload.token: ${{
secrets.LHCI_TOKEN }}
ADDING
SETTINGS AS
GITHUB
SECRETS
SENDING
REPORTS TO
LHCI SERVER
SUMMARY LHCI GITHUB ACTION CAN SEND
REPORTS DIRECTLY TO A LHCI SERVER
GITHUB SECRETS CAN KEEP THE
ADDRESS OF THE LHCI SERVER AND
TOKEN PRIVATE
We offer guaranteed PSI scores of
+70 in mobile and +80 in desktop
for Shopify stores
Visit to learn more
https://bit.ly/2ECAr6z
THANK YOU
@hamletbatista
https://www.ranksense.com

More Related Content

PDF
AI-powered Semantic SEO by Koray GUBUR
PDF
Quality Content at Scale Through Automated Text Summarization of UGC
PDF
The Python Cheat Sheet for the Busy Marketer
PPTX
BrightonSEO March 2021 | Dan Taylor, Image Entity Tags
PPTX
Semantic Content Networks - Ranking Websites on Google with Semantic SEO
PPTX
How to Automatically Subcategorise Your Website Automatically With Python
PPTX
The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?
PPTX
Keyword Research and Topic Modeling in a Semantic Web
AI-powered Semantic SEO by Koray GUBUR
Quality Content at Scale Through Automated Text Summarization of UGC
The Python Cheat Sheet for the Busy Marketer
BrightonSEO March 2021 | Dan Taylor, Image Entity Tags
Semantic Content Networks - Ranking Websites on Google with Semantic SEO
How to Automatically Subcategorise Your Website Automatically With Python
The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?
Keyword Research and Topic Modeling in a Semantic Web

What's hot (20)

PPTX
Semantic seo and the evolution of queries
PDF
7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon
PDF
SEO Case Study - Hangikredi.com From 12 March to 24 September Core Update
PDF
How to Implement Machine Learning in Your Internal Linking Audit - Lazarina S...
PPTX
GretaMunari - The redemption of content automation
PDF
Antifragility in Digital Marketing
PPTX
How to Generate Content that Builds it's Own Links
PDF
Analisis de Contenidos SEO: método Triple A #SEOnderground 2022
PPTX
William slawski-google-patents- how-do-they-influence-search
PPT
SEO & Patents Vrtualcon v. 3.0
PDF
Data Driven Approach to Scale SEO at BrightonSEO 2023
PPTX
Search Query Processing: The Secret Life of Queries, Parsing, Rewriting & SEO
PPTX
Why Scaling (Great) Content Is So Bloody Hard
PPTX
Entity seo
PPTX
Crawl Budget: Everything you Need to Know
PPTX
How to leverage indexation tracking to monitor issues and improve performance
PPTX
Beth Barnham Schema Auditing BrightonSEO Slides.pptx
PDF
BrightonSEO October 2022 - Log File Analysis - Steven van Vessum.pdf
PDF
eCommerce Internal Linking - Into the Spider-Verse (BrightonSEO edition)
PDF
How to Prepare Your Brand for Upcoming AI Features in Search
Semantic seo and the evolution of queries
7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon
SEO Case Study - Hangikredi.com From 12 March to 24 September Core Update
How to Implement Machine Learning in Your Internal Linking Audit - Lazarina S...
GretaMunari - The redemption of content automation
Antifragility in Digital Marketing
How to Generate Content that Builds it's Own Links
Analisis de Contenidos SEO: método Triple A #SEOnderground 2022
William slawski-google-patents- how-do-they-influence-search
SEO & Patents Vrtualcon v. 3.0
Data Driven Approach to Scale SEO at BrightonSEO 2023
Search Query Processing: The Secret Life of Queries, Parsing, Rewriting & SEO
Why Scaling (Great) Content Is So Bloody Hard
Entity seo
Crawl Budget: Everything you Need to Know
How to leverage indexation tracking to monitor issues and improve performance
Beth Barnham Schema Auditing BrightonSEO Slides.pptx
BrightonSEO October 2022 - Log File Analysis - Steven van Vessum.pdf
eCommerce Internal Linking - Into the Spider-Verse (BrightonSEO edition)
How to Prepare Your Brand for Upcoming AI Features in Search
Ad

Similar to Automating Google Lighthouse (20)

PDF
Performance Monitoring with Google Lighthouse
PDF
Build a chatroom!
PDF
WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...
PPTX
Using the WordPress REST API and Gatsby.js
DOCX
Introduction to SEO with Google Lighthouse
PDF
Pump up the JAM with Gatsby
PDF
Lighthouse
PPTX
Build Fast WordPress Site With Gatsby
PPTX
Creating Your Own Static Website Generator
PDF
GraphQL Bangkok Meetup 6.0
PDF
Modern Static Site with GatsbyJS
PDF
Lighthouse
PPTX
Library Carpentry Git, GitHub and GitPages Introduction Slides
PDF
JAMstack with gatsby, contentful and netlify aka the dream stack
PDF
Final gatsby + wagtail - Inclusive product week
PDF
implement lighthouse-ci with your web development workflow
PPTX
Shining a light on performance (js meetup)
PDF
Integrating continuous integration and deployment with GitHub’s API
PDF
Serverless Finland Meetup 16.11.2016: Messenger Bot Workshop
PDF
Wordpress vs JamStack
Performance Monitoring with Google Lighthouse
Build a chatroom!
WordCamp Athens 2017 - Building an E-commerce Progressive Web App with React ...
Using the WordPress REST API and Gatsby.js
Introduction to SEO with Google Lighthouse
Pump up the JAM with Gatsby
Lighthouse
Build Fast WordPress Site With Gatsby
Creating Your Own Static Website Generator
GraphQL Bangkok Meetup 6.0
Modern Static Site with GatsbyJS
Lighthouse
Library Carpentry Git, GitHub and GitPages Introduction Slides
JAMstack with gatsby, contentful and netlify aka the dream stack
Final gatsby + wagtail - Inclusive product week
implement lighthouse-ci with your web development workflow
Shining a light on performance (js meetup)
Integrating continuous integration and deployment with GitHub’s API
Serverless Finland Meetup 16.11.2016: Messenger Bot Workshop
Wordpress vs JamStack
Ad

More from Hamlet Batista (20)

PDF
A Deep Dive Into SEO Tactics For Modern Javascript Frameworks
PDF
Automated Duplicate Content Consolidation with Google Cloud Functions
PDF
SEO Meets Automation
PDF
Creando una Sección de FAQS y su Marcado de Datos Estructurados en 30 Minutos
PPTX
Doing More with Less: Automated, High-Quality Content Generation
PPTX
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
PPTX
Agile SEO: Faster SEO Results
PPTX
Scaling Keyword Research to Find Content Gaps
PPTX
Query Classification on Steroids with BERT
PPTX
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
PPTX
Python for Data-driven Storytelling
PPTX
Scaling automated quality text generation for enterprise sites
PPTX
The New Renaissance of JavaScript
PPTX
Data and Evidence-driven SEO
PPTX
Python for SEO
PPTX
Advanced Data-Driven SEO
PPTX
Technical SEO "Overoptimization"
PPTX
Why Pay for Performance When You Can Lead the World To Your Door for Free?
PPTX
Gettin' It Up And Keepin' It Up in Google
PPTX
Batista, Hamlet, Beyond The Usual Link Building
A Deep Dive Into SEO Tactics For Modern Javascript Frameworks
Automated Duplicate Content Consolidation with Google Cloud Functions
SEO Meets Automation
Creando una Sección de FAQS y su Marcado de Datos Estructurados en 30 Minutos
Doing More with Less: Automated, High-Quality Content Generation
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
Agile SEO: Faster SEO Results
Scaling Keyword Research to Find Content Gaps
Query Classification on Steroids with BERT
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Python for Data-driven Storytelling
Scaling automated quality text generation for enterprise sites
The New Renaissance of JavaScript
Data and Evidence-driven SEO
Python for SEO
Advanced Data-Driven SEO
Technical SEO "Overoptimization"
Why Pay for Performance When You Can Lead the World To Your Door for Free?
Gettin' It Up And Keepin' It Up in Google
Batista, Hamlet, Beyond The Usual Link Building

Recently uploaded (20)

PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
PDF
Advancing precision in air quality forecasting through machine learning integ...
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PDF
Connector Corner: Transform Unstructured Documents with Agentic Automation
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PPTX
Microsoft User Copilot Training Slide Deck
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
LMS bot: enhanced learning management systems for improved student learning e...
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Ensemble model-based arrhythmia classification with local interpretable model...
PDF
Human Computer Interaction Miterm Lesson
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
A symptom-driven medical diagnosis support model based on machine learning te...
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
Advancing precision in air quality forecasting through machine learning integ...
SGT Report The Beast Plan and Cyberphysical Systems of Control
Connector Corner: Transform Unstructured Documents with Agentic Automation
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
Microsoft User Copilot Training Slide Deck
Training Program for knowledge in solar cell and solar industry
Co-training pseudo-labeling for text classification with support vector machi...
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
LMS bot: enhanced learning management systems for improved student learning e...
EIS-Webinar-Regulated-Industries-2025-08.pdf
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Ensemble model-based arrhythmia classification with local interpretable model...
Human Computer Interaction Miterm Lesson
Build Real-Time ML Apps with Python, Feast & NoSQL
Electrocardiogram sequences data analytics and classification using unsupervi...
4 layer Arch & Reference Arch of IoT.pdf
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf

Automating Google Lighthouse