From d4b311a5b088903fe2fa362497b63809076fce94 Mon Sep 17 00:00:00 2001 From: Pushkar Mhatre <126671657+push4007@users.noreply.github.com> Date: Tue, 26 Nov 2024 03:06:59 +0530 Subject: [PATCH] Vercel YML --- .github/workflows/vercel-deployment.yml | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/vercel-deployment.yml diff --git a/.github/workflows/vercel-deployment.yml b/.github/workflows/vercel-deployment.yml new file mode 100644 index 00000000..2b8f3639 --- /dev/null +++ b/.github/workflows/vercel-deployment.yml @@ -0,0 +1,41 @@ +name: Deploy to Vercel + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + # Step 1: Checkout the code + - name: Checkout code + uses: actions/checkout@v2 + + # Step 2: Set up Node.js (if using Node.js/React/Next.js) + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' # Specify the Node.js version + + # Step 3: Install dependencies + - name: Install dependencies + run: npm install + + # Step 4: Build the application (if applicable) + - name: Build app + run: npm run build # Change to your build command, if different + + # Step 5: Deploy to Vercel + - name: Deploy to Vercel + uses: amondnet/vercel-action@v20 + with: + vercel-token: ${{ secrets.VERCEL_TOKEN }} # Vercel token for authentication + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} # Project ID from Vercel dashboard + vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} # Organization ID from Vercel dashboard + vercel-arg: '--prod' # Option to deploy to production