feat: unify 9ruby site design system #7
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 9Ruby Home | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| build-and-deploy: | |
| name: Build & Deploy | |
| runs-on: ubuntu-latest | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check and build | |
| run: npm run build | |
| - name: Check Vercel credentials | |
| id: vercel-secrets | |
| run: | | |
| if [ -n "$VERCEL_TOKEN" ] && [ -n "$VERCEL_ORG_ID" ] && [ -n "$VERCEL_PROJECT_ID" ]; then | |
| echo "configured=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "configured=false" >> "$GITHUB_OUTPUT" | |
| echo "Vercel deployment skipped because VERCEL_TOKEN, VERCEL_ORG_ID, or VERCEL_PROJECT_ID is not configured in GitHub Secrets." | |
| fi | |
| - name: Install Vercel CLI | |
| if: steps.vercel-secrets.outputs.configured == 'true' | |
| run: npm install -g vercel | |
| - name: Pull Vercel environment | |
| if: steps.vercel-secrets.outputs.configured == 'true' | |
| run: vercel pull --yes --environment=production --token="$VERCEL_TOKEN" | |
| - name: Deploy to Vercel Production | |
| if: steps.vercel-secrets.outputs.configured == 'true' | |
| run: vercel deploy --prod --token="$VERCEL_TOKEN" | |
| notify: | |
| name: Notification | |
| needs: build-and-deploy | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Send deployment notification | |
| run: | | |
| if [ "${{ needs.build-and-deploy.result }}" == "success" ]; then | |
| echo "Deployment workflow successful. If Vercel secrets are not configured, production deploy is handled manually/Vercel-side." | |
| else | |
| echo "Deployment workflow failed: 9Ruby Home deployment encountered an error." | |
| fi |