ci: add GitHub Actions for Next.js build and Python lint #2
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
| name: Next.js Build | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - rebranding/bishop-state | |
| paths: | |
| - "codebenders-dashboard/**" | |
| jobs: | |
| build: | |
| name: Type-check & build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: codebenders-dashboard | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: npm install --ignore-scripts | |
| - name: Build | |
| run: npm run build | |
| env: | |
| # Prevent Next.js from failing at build time due to missing runtime env vars. | |
| # The pg pool is only instantiated at request time, not during build. | |
| NEXT_PUBLIC_PLACEHOLDER: "ci" |