Skip to content

Commit 454af9e

Browse files
committed
lighthouse url preview var updated
1 parent 8996fc4 commit 454af9e

2 files changed

Lines changed: 3 additions & 15 deletions

File tree

.github/lighthouserc.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
let previewBaseUrl = '';
2-
try {
3-
const previewUrlBase64 = process.env.LHCI_PREVIEW_URL_BASE64;
4-
console.log("environemtnt variable LHCI_PREVIEW_URL:", previewUrlBase64);
5-
if (previewUrlBase64) {
6-
const decodedUrl = Buffer.from(previewUrlBase64, 'base64').toString('utf-8');
7-
console.log("Decoded preview URL:", decodedUrl);
8-
previewBaseUrl = decodedUrl;
9-
} else {
10-
console.error("LHCI_PREVIEW_URL_BASE64 environment variable is not set.");
11-
}
12-
} catch (error) {
13-
console.error("Error decoding LHCI_PREVIEW_URL_BASE64:", error);
14-
}
1+
let previewBaseUrl = process.env.LHCI_PREVIEW_URL || 'http://localhost:3000';
2+
console.log("Initial preview URL:", previewBaseUrl);
153

164
module.exports = {
175
ci: {

.github/workflows/vercel-preview-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
configPath: ./.github/lighthouserc.js
103103
temporaryPublicStorage: true
104104
env:
105-
LHCI_PREVIEW_URL_BASE64: ${{ steps.get_vercel_url.outputs.url }}
105+
LHCI_PREVIEW_URL: ${{ steps.get_vercel_url.outputs.url }}
106106
VERCEL_TOKEN: ${{ env.VERCEL_TOKEN }}
107107

108108
- name: Format lighthouse score

0 commit comments

Comments
 (0)