deploy to production #22
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 production | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout Pull Request Code | |
| - name: Checkout Pull Request Code | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: main | |
| # Step 2: Install Node.js | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20.x | |
| # Step 3: Install Dependencies | |
| # - name: Install Dependencies | |
| # run: | | |
| # npm install --legacy-peer-deps | |
| # # Step 4: Build App | |
| # - name: Build App | |
| # run: | | |
| # npm run build | |
| # Step 5: Deploy to Production | |
| - name: Deploy to Vercel | |
| uses: amondnet/vercel-action@v25 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| vercel-org-id: ${{ secrets.ORG_ID}} | |
| vercel-project-id: ${{ secrets.PROJECT_ID }} | |
| vercel-args: "--prod" | |
| working-directory: ./ |