Skip to content

Commit

Permalink
feat(project): fix lhci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLantukh committed Jul 13, 2023
1 parent 6b8973e commit 466e8e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 25 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/firebase-preview.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Firebase Preview
name: Preview and Lighthouse

on:
pull_request:
branches: ['develop', 'feat/*', 'feature/*', 'release']

jobs:
build_and_preview:
name: Build and preview
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.firebase_hosting_preview.outputs.details_url }}
steps:
- uses: actions/checkout@v2
- name: Build
- name: Build Preview Link
env:
APP_PLAYER_LICENSE_KEY: ${{ secrets.PLAYER_LICENSE_KEY }}
run: yarn && MODE=preview yarn build
Expand All @@ -19,8 +22,14 @@ jobs:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
expires: 30d
- name: Dispatch init event to run Lighthouse
env:
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |
gh workflow run 'Lighthouse' --ref '${{ github.event.pull_request.head.ref }}' -f url='${{ steps.firebase_hosting_preview.outputs.details_url }}'

lhci:
name: Lighthouse
runs-on: ubuntu-latest
needs: build_and_preview
steps:
- uses: actions/checkout@v2
- 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.js
18 changes: 0 additions & 18 deletions .github/workflows/lhci.yml

This file was deleted.

0 comments on commit 466e8e3

Please sign in to comment.