-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (35 loc) · 932 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 }}