mirror of
https://github.com/bartvdbraak/hellob.art.git
synced 2025-06-28 15:29:11 +00:00
refactor: run lighthouse accurate on vercel target
This commit is contained in:
parent
db02a217b1
commit
176d58ab41
2 changed files with 23 additions and 9 deletions
24
.github/workflows/unlighthouse.yaml
vendored
24
.github/workflows/unlighthouse.yaml
vendored
|
@ -40,15 +40,21 @@ jobs:
|
|||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- name: Retrieve Vercel Preview URL
|
||||
uses: zentered/vercel-preview-url@v1.1.9
|
||||
id: vercel_preview_url
|
||||
env:
|
||||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
||||
with:
|
||||
vercel_project_id: ${{ vars.VERCEL_PROJECT_ID }}
|
||||
|
||||
- name: Build production
|
||||
run: pnpm run build
|
||||
|
||||
- name: Start Preview and Get Preview URL
|
||||
run: |
|
||||
pnpm run preview --port ${{ env.PORT }} & echo $! > preview_pid
|
||||
- name: Await Vercel Deployment
|
||||
uses: UnlyEd/github-action-await-vercel@v1.2.43
|
||||
env:
|
||||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
||||
with:
|
||||
deployment-url: ${{ steps.vercel_preview_url.outputs.preview_url }}
|
||||
timeout: 120
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm add -g @unlighthouse/cli puppeteer
|
||||
|
@ -56,7 +62,7 @@ jobs:
|
|||
- name: Run Unlighthouse
|
||||
run: |
|
||||
unlighthouse-ci \
|
||||
--site "http://localhost:${{ env.PORT }}" \
|
||||
--site "${{ steps.vercel_preview_url.outputs.preview_url }}" \
|
||||
--reporter jsonExpanded \
|
||||
--build-static
|
||||
|
||||
|
|
8
unlighthouse.config.ts
Normal file
8
unlighthouse.config.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
export default {
|
||||
scanner: {
|
||||
samples: 3
|
||||
},
|
||||
puppeteerClusterOptions: {
|
||||
maxConcurrency: 1
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue