ci.yaml (1124B)
1 name: Run Lint on Push and Pull Request 2 3 on: 4 push: 5 branches: 6 - main 7 pull_request: 8 branches: 9 - main 10 # Allows you to run this workflow manually from the Actions tab 11 workflow_dispatch: 12 13 jobs: 14 lint: 15 runs-on: ubuntu-latest 16 steps: 17 - name: Checkout 18 uses: actions/checkout@v4 19 - uses: pnpm/action-setup@v4 20 with: 21 run_install: false 22 - name: Setup Node 23 uses: actions/setup-node@v4 24 with: 25 node-version: "23" 26 cache: "pnpm" 27 - name: Restore cache 28 uses: actions/cache@v4 29 with: 30 path: | 31 .next/cache 32 # Generate a new cache whenever packages or source files change. 33 key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} 34 # If source files changed but packages didn't, rebuild from a prior cache. 35 restore-keys: | 36 ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.json') }}- 37 - name: Install dependencies 38 run: pnpm install 39 - name: Lint 40 run: pnpm lint