Skip to content

Commit

Permalink
๐Ÿ› Fix: lighthouserc ouputDir ์„ค์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
shlee9999 committed Nov 16, 2024
1 parent 30b60b6 commit 4cd27e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
run: |
npm install -g @lhci/cli
lhci autorun --collect.settings.chromeFlags="--ignore-certificate-errors --no-sandbox --headless --disable-gpu"|| echo "Fail to Run Lighthouse CI!"
lhci autorun --collect.settings.chromeFlags="--ignore-certificate-errors --no-sandbox --headless --disable-gpu" || echo "Fail to Run Lighthouse CI!"
- name: Format lighthouse score
id: format_lighthouse_score
Expand All @@ -55,7 +55,7 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs');
const results = JSON.parse(fs.readFileSync("./lhci_reports/manifest.json"));
const results = JSON.parse(fs.readFileSync("./.lighthouseci/manifest.json"));
let comments = "";
results.forEach((result) => {
const { summary, jsonPath } = result;
Expand Down
5 changes: 4 additions & 1 deletion lighthouserc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
ci: {
collect: {
staticDistDir: './build',
numberOfRuns: 1,
startServerCommand: 'npm run dev',
url: ['https://localhost:3000'],
Expand All @@ -9,7 +10,9 @@ module.exports = {
// preset: 'lighthouse:recommended',
// },
upload: {
target: 'temporary-public-storage',
target: 'filesystem',
outputDir: './lhci_reports',
reportFilenamePattern: '%%PATHNAME%%-%%DATETIME%%-report.%%EXTENSION%%',
},
},
}

0 comments on commit 4cd27e2

Please sign in to comment.