> For the complete documentation index, see [llms.txt](https://margaritahumanitarian.gitbook.io/help-a-family-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://margaritahumanitarian.gitbook.io/help-a-family-manual/env_vars/lighthouse-ci.md).

# Lighthouse CI

Lighthouse is a tool for testing page speed and performance. We use it with a GitHub action to performance-test pull requests.

### Target Audience: Other Nonprofit Organizations

This info is only for those who are deploying a production instance of Help-a-Family.&#x20;

It's not necessary for most developers contributing to Help-a-Family to follow these instructions.

### Getting a Lighthouse CI GitHub App Token

When setting up this project for your GitHub organization, you'll need to add `LHCI_GITHUB_APP_TOKEN` to the project's Settings on GitHub.

First, generate your token by installing the Lighthouse CI app: <https://github.com/apps/lighthouse-ci>

![Click the "Configure" button](/files/-MjQXM10SVAwzdZMasZQ)

Install Lighthouse CI to only the helpafamily repo for your org:

![Only select the helpafamily repo](/files/-MjQXw-s96-f0tLUhw52)

Copy-paste the `LHCI_GITHUB_APP_TOKEN` to your .env file so you don't lose it:

![Copy the token from here](/files/-MjQY5ANz15CYTS53HwB)

Add the new repo secret:

![Click "New repository secret"](/files/-MjQYhMqeZq5G0ILj1TW)

Paste your secret in:

![Paste it and click "Add secret"](/files/-MjQYuapLQyX7eUrjJT8)

Your secret should now show up:

![See it under "Repository secrets"](/files/-MjQZI-VdzKpcXoe0dIe)
