Skip to content

fix: resolve CodeQL, Gitleaks, Black, and Standard JS CI failures #310

fix: resolve CodeQL, Gitleaks, Black, and Standard JS CI failures

fix: resolve CodeQL, Gitleaks, Black, and Standard JS CI failures #310

Workflow file for this run

# Sample workflow for building and deploying a Next.js site to GitHub Pages
name: Deploy Next.js site to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/next-app/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
elif [ -f "${{ github.workspace }}/next-app/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
else
echo "Unable to determine package manager"
false
fi
- name: Setup Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
cache-dependency-path: next-app/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b
with:
static_site_generator: next
- name: Restore cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
path: |
next-app/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('next-app/package-lock.json', 'next-app/yarn.lock') }}-${{ hashFiles('next-app/**/*.[jt]s', 'next-app/**/*.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('next-app/package-lock.json', 'next-app/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
working-directory: next-app
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
working-directory: next-app
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
with:
path: next-app/out
deploy:

Check failure on line 68 in .github/workflows/nextjs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/nextjs.yml

Invalid workflow file

You have an error in your yaml syntax on line 68
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e