From 2c6b8e58aea581f8a3557a80fa66942a97b4c77d Mon Sep 17 00:00:00 2001 From: Sohail-9 Date: Wed, 27 Nov 2024 19:45:06 +0530 Subject: [PATCH] updated client/server deployment.yml file --- .github/workflows/deploy-client.yml | 13 ++++++++++--- .github/workflows/deploy-server.yml | 17 ++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-client.yml b/.github/workflows/deploy-client.yml index 0df672a..fad209d 100644 --- a/.github/workflows/deploy-client.yml +++ b/.github/workflows/deploy-client.yml @@ -3,7 +3,7 @@ name: Deploy Client Production on: push: paths: - - "client/**" + - "client/**" # Trigger when any file in the 'client' folder is changed jobs: deploy: @@ -13,10 +13,17 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '16' # Ensure you're using the appropriate Node.js version + + - name: Install Vercel CLI globally + run: npm install -g vercel + - name: Deploy to Vercel env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} run: | - npm install -g vercel - cd client + cd client # Navigate to the client directory vercel --prod --token $VERCEL_TOKEN diff --git a/.github/workflows/deploy-server.yml b/.github/workflows/deploy-server.yml index 5e3035d..4425789 100644 --- a/.github/workflows/deploy-server.yml +++ b/.github/workflows/deploy-server.yml @@ -1,9 +1,9 @@ -name: Deploy Server +name: Deploy Server Production on: push: paths: - - "server/**" + - "server/**" # Trigger when any file in the 'server' folder is changed jobs: deploy: @@ -13,10 +13,17 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '16' # Ensure you're using the appropriate Node.js version + + - name: Install Vercel CLI globally + run: npm install -g vercel + - name: Deploy to Vercel env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Use your Vercel token here + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} run: | - npm install -g vercel - cd server # Navigate to server directory + cd server # Navigate to the server directory vercel --prod --token $VERCEL_TOKEN