fix: hydration error, CSS to globals, fix admin imports, add next-auth #12
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: CI - Build & Deploy | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate Prisma client | |
| run: npx prisma generate | |
| env: | |
| DATABASE_URL: "postgresql://user:password@localhost:5432/teos?schema=public" | |
| - name: Type check | |
| run: npx tsc --noEmit | |
| - name: Build | |
| run: npm run build | |
| env: | |
| DATABASE_URL: "postgresql://user:password@localhost:5432/teos?schema=public" | |
| NEXTAUTH_SECRET: "ci-test-secret-do-not-use" | |
| NEXTAUTH_URL: "http://localhost:3000" | |
| OPENAI_API_KEY: "sk-test-ci" | |
| ADMIN_EMAIL: "ci@test.com" | |
| # Vercel deploy (uncomment and set secrets in GitHub to enable) | |
| # deploy: | |
| # if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| # needs: build | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - uses: vercel/action@v34 | |
| # with: | |
| # vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| # vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| # vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} |