update Projects.jsx #32
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 React Portfolio to Vercel | |
| on: | |
| workflow_dispatch: # Allows manual triggering | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout repository | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Set up Node.js | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' | |
| # Install dependencies | |
| - name: Install dependencies | |
| run: npm ci | |
| # Build the React app | |
| - name: Build the project | |
| run: npm run build | |
| # Install Vercel CLI | |
| - name: Install Vercel CLI | |
| run: npm install -g vercel | |
| # Deploy to Vercel | |
| - name: Deploy to Vercel | |
| run: vercel --prod --token ${{ secrets.VERCEL_TOKEN }} --confirm |