fix(web): hide public sync alerts and handle digest emails #43
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| validate: | |
| environment: production | |
| runs-on: ubuntu-latest | |
| env: | |
| NEXT_PUBLIC_CONVEX_URL: ${{ vars.NEXT_PUBLIC_CONVEX_URL || secrets.NEXT_PUBLIC_CONVEX_URL }} | |
| CONVEX_SITE_URL: ${{ vars.CONVEX_SITE_URL || secrets.CONVEX_SITE_URL }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Security audit | |
| run: pnpm audit --audit-level=high | |
| continue-on-error: true | |
| - name: Check folder size limit | |
| run: bash scripts/check-folder-size.sh | |
| - name: Check centralized constants | |
| run: pnpm check:constants | |
| - name: Check no new magic numbers on changed files | |
| run: pnpm check:no-magic-changed | |
| - name: Lint and Format check | |
| run: pnpm lint | |
| - name: Typecheck | |
| run: pnpm typecheck | |
| - name: Run Tests | |
| run: pnpm --filter @stackmatch/web test | |
| - name: Restore Next.js build cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: apps/web/.next/cache | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('package.json', 'pnpm-workspace.yaml', 'turbo.json', 'packages/*/package.json', 'packages/*/src/**', 'apps/web/app/**', 'apps/web/components/**', 'apps/web/convex/**', 'apps/web/data/**', 'apps/web/lib/**', 'apps/web/public/**', 'apps/web/styles/**', 'apps/web/*.json', 'apps/web/*.mjs', 'apps/web/*.ts', 'apps/web/*.tsx') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}- | |
| ${{ runner.os }}-nextjs- | |
| - name: Build | |
| run: pnpm build | |
| env: | |
| SKIP_ENV_VALIDATION: "1" | |
| - name: Deploy Convex | |
| if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') | |
| run: pnpm exec convex deploy -y | |
| working-directory: apps/web | |
| env: | |
| CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }} |