-
Notifications
You must be signed in to change notification settings - Fork 55
41 lines (37 loc) · 1.27 KB
/
web-test-deploy-preview-and-lighthouse.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
name: Web - Test - PR Deploy Preview and Lighthouse Test
on:
pull_request:
defaults:
run:
working-directory: ./platforms/web
jobs:
build_and_preview:
name: Build and preview
if: '! github.event.pull_request.head.repo.fork '
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.firebase_hosting_preview.outputs.details_url }}
steps:
- uses: actions/checkout@v3
- name: Build Preview Link
env:
APP_PLAYER_LICENSE_KEY: ${{ secrets.PLAYER_LICENSE_KEY }}
run: yarn && MODE=preview yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
id: firebase_hosting_preview
with:
entryPoint: './platforms/web'
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
expires: 30d
lhci:
name: Lighthouse
if: '! github.event.pull_request.head.repo.fork '
runs-on: ubuntu-latest
needs: build_and_preview
steps:
- uses: actions/checkout@v3
- name: Install Lighthouse CI
run: sudo yarn global add @lhci/[email protected]
- name: Run Lighthouse CI
run: lhci autorun --collect.url=${{ needs.build_and_preview.outputs.output1 }}?app-config=gnnuzabk --config=./lighthouserc.cjs