feat(auth): 添加 ParticleAuthWrapper 组件包裹子组件 #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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| # Particle API Configuration | |
| CLIENT: ${{ secrets.CLIENT }} | |
| PROJECT_ID: ${{ secrets.PROJECT_ID }} | |
| SERVER: ${{ secrets.SERVER }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| env: | |
| # Database URL for build (can be a dummy for type checking) | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| # Particle API (Using NEXT_PUBLIC_ prefix for client-side access) | |
| NEXT_PUBLIC_PARTICLE_PROJECT_ID: ${{ secrets.PROJECT_ID }} | |
| NEXT_PUBLIC_PARTICLE_CLIENT_KEY: ${{ secrets.CLIENT }} | |
| NEXT_PUBLIC_PARTICLE_APP_ID: ${{ secrets.APP_ID || secrets.SERVER }} |