Potential fix for code scanning alert no. 1: Uncontrolled data used in path expression #31
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/lighthouse.yml | |
| name: 'Lighthouse CI' | |
| on: | |
| push: | |
| branches: [main, master] # Run on pushes to main/master | |
| pull_request: # Run on pull requests | |
| jobs: | |
| lighthouse: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Checkout Repo' | |
| uses: actions/checkout@v4 | |
| # --- If you have a build step, add it here --- | |
| - name: 'Use Node.js' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 # Specify your node version | |
| - name: 'Install Dependencies' | |
| run: npm install # or 'yarn install' | |
| - name: 'Build Website' | |
| run: npm run build # or your specific build command | |
| # ---------------------------------------------- | |
| - name: 'Run Lighthouse CI' | |
| uses: treosh/lighthouse-ci-action@v11 | |
| with: | |
| # This action will automatically find your .lighthouserc.json file | |
| # and server-static-site. | |
| uploadArtifacts: true # Save reports as artifacts | |
| temporaryPublicStorage: true # Upload to temp storage for a shareable link |