Skip to content

Update package-lock.json #135

Update package-lock.json

Update package-lock.json #135

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened, closed, labeled]
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
lint:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run lint
test:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx vitest run --coverage
preview:
if: >-
always() &&
contains(github.event.pull_request.labels.*.name, 'preview') &&
(github.event.action == 'closed' || (needs.lint.result == 'success' && needs.test.result == 'success'))
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- if: github.event.action != 'closed'
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- if: github.event.action != 'closed'
run: npm ci
- if: github.event.action != 'closed'
name: Build
env:
NEXT_PUBLIC_BASE_PATH: /leetcode-patterns/pr-preview/pr-${{ github.event.number }}
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
run: npx next build
- if: github.event.action != 'closed'
name: Remove service worker from preview
run: rm -f out/sw.js
- uses: rossjrw/pr-preview-action@v1
with:
source-dir: out