GitLab features a useful tool for measuring the performance of a website, similar to Pagespeed insights. With this, you can measure the performance of your website after every deployment or even at each merge request. I have set this up for our homepage.
All it takes are a few adaptations to the gitlab-ci.yaml:
1include:
2 template: Verify/Browser-Performance.gitlab-ci.yml
3
4browser_performance:
5 only:
6 - main
7 needs:
8 - deployProd
9 variables:
10 URL: https://newcubator.com/
11 SITESPEED_OPTIONS: -n 5
If you're making use of review apps, you can even evaluate the performance for each merge request.
Find more in the GitLab documentation:
https://docs.gitlab.com/ee/ci/testing/browser_performance_testing.html