fix: 修复 OAUTH_ALLOWED_USERS 数字类型校验失败 #6
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: Deploy to Vercel | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| vercel: | |
| runs-on: ubuntu-latest | |
| name: "Deploy to Vercel" | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 24 | |
| cache: 'npm' | |
| - name: Check Required Secrets | |
| run: | | |
| REQUIRED=(VERCEL_TOKEN VERCEL_ORG_ID VERCEL_PROJECT_ID) | |
| for var in "${REQUIRED[@]}"; do | |
| if [ -z "${!var}" ]; then | |
| echo "❌ Error: $var is missing." | |
| exit 1 | |
| fi | |
| done | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| - name: Inject Commit Hash & Platform | |
| run: node scripts/inject_vars.js --platform=vercel | |
| - name: Install Vercel CLI | |
| run: npm install --global vercel@latest | |
| - name: Build and Deploy to Vercel | |
| run: | | |
| vercel deploy --prod --yes --token=${{ secrets.VERCEL_TOKEN }} > /dev/null 2>&1 | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| - name: Success Notification | |
| run: echo "🚀 NodeAuth deployed successfully to Vercel!" |