Feature/lighthouse ci #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lighthouse CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
# Agregamos la sección de permisos | |
permissions: | |
contents: read | |
pull-requests: write | |
checks: write # Esto es crucial para los status checks | |
jobs: | |
lighthouse: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} # Asegura que estamos en el commit correcto del PR | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: 1.1.5 | |
- name: Install dependencies | |
run: bun install | |
- name: Build project | |
run: bun run build | |
- name: Install and Run Lighthouse CI | |
run: | | |
bun add -g @lhci/[email protected] | |
bunx lhci autorun | |
env: | |
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} |