Skip to content

Commit a595a80

Browse files
author
Deepak Pandey
committed
fix: Resolve Lighthouse CI build and GitHub token issues
πŸ”§ Additional fixes: 1. βœ… Lighthouse CI build issue - Updated startServerCommand to include 'npm run build && npm run start' 2. βœ… GitHub token issue - Added GITHUB_TOKEN environment variable for Lighthouse CI 3. βœ… Build sequence - Ensures Next.js app is built before starting for Lighthouse CI 🎯 Root cause fixes: - Lighthouse CI was trying to start server without building first - Missing GITHUB_TOKEN for Lighthouse CI GitHub integration - Build and start sequence now properly configured This should resolve both the 'Could not find production build' and 'GitHub token not set' errors.
1 parent 7412abc commit a595a80

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

β€Ž.github/workflows/ci-cd.ymlβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ jobs:
594594
env:
595595
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
596596
LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}
597+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
597598

598599
- name: Upload performance results
599600
uses: actions/upload-artifact@v4

β€Žlighthouserc.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
'http://localhost:3000/auth/signin',
1010
'http://localhost:3000/protected/dashboard'
1111
],
12-
startServerCommand: 'npm run start',
12+
startServerCommand: 'npm run build && npm run start',
1313
startServerReadyPattern: 'ready on',
1414
startServerReadyTimeout: 30000,
1515
numberOfRuns: 3,

0 commit comments

Comments
Β (0)