From 4ce6995a7a966023c081cc2eead06e9983a60caa Mon Sep 17 00:00:00 2001 From: Mohammad Mortaza Nabizada Date: Tue, 2 Jun 2026 23:15:32 +0430 Subject: [PATCH 1/2] CI workflows added --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df0a02d..44e6b6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,10 +73,10 @@ jobs: run: npm ci - name: Pull Vercel project settings - run: npx vercel@latest pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + run: npx --yes vercel@latest pull --yes --environment=production --project=${{ secrets.VERCEL_PROJECT_ID }} --scope=${{ secrets.VERCEL_ORG_ID }} --token=${{ secrets.VERCEL_TOKEN }} - name: Build with Vercel - run: npx vercel@latest build --prod --token=${{ secrets.VERCEL_TOKEN }} + run: npx --yes vercel@latest build --prod --project=${{ secrets.VERCEL_PROJECT_ID }} --scope=${{ secrets.VERCEL_ORG_ID }} --token=${{ secrets.VERCEL_TOKEN }} --yes env: VITE_API_URL: ${{ vars.VITE_API_URL }} VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }} @@ -92,4 +92,4 @@ jobs: SENTRY_RELEASE: ${{ github.sha }} - name: Deploy prebuilt output to Vercel - run: npx vercel@latest deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} + run: npx --yes vercel@latest deploy --prebuilt --prod --project=${{ secrets.VERCEL_PROJECT_ID }} --scope=${{ secrets.VERCEL_ORG_ID }} --token=${{ secrets.VERCEL_TOKEN }} --yes From 8f66db35cf2fce160c475652e48bd35514fc85f5 Mon Sep 17 00:00:00 2001 From: Mohammad Mortaza Nabizada Date: Tue, 2 Jun 2026 23:23:34 +0430 Subject: [PATCH 2/2] CI/CD --- .github/workflows/ci.yml | 18 +++++++++++------- vercel.json | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 vercel.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44e6b6c..53b1145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,11 +72,9 @@ jobs: - name: Install dependencies run: npm ci - - name: Pull Vercel project settings - run: npx --yes vercel@latest pull --yes --environment=production --project=${{ secrets.VERCEL_PROJECT_ID }} --scope=${{ secrets.VERCEL_ORG_ID }} --token=${{ secrets.VERCEL_TOKEN }} - - - name: Build with Vercel - run: npx --yes vercel@latest build --prod --project=${{ secrets.VERCEL_PROJECT_ID }} --scope=${{ secrets.VERCEL_ORG_ID }} --token=${{ secrets.VERCEL_TOKEN }} --yes + - name: Build production bundle + run: | + npm run build env: VITE_API_URL: ${{ vars.VITE_API_URL }} VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }} @@ -91,5 +89,11 @@ jobs: SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} SENTRY_RELEASE: ${{ github.sha }} - - name: Deploy prebuilt output to Vercel - run: npx --yes vercel@latest deploy --prebuilt --prod --project=${{ secrets.VERCEL_PROJECT_ID }} --scope=${{ secrets.VERCEL_ORG_ID }} --token=${{ secrets.VERCEL_TOKEN }} --yes + - name: Deploy to Vercel + uses: vercel/action@v3 + with: + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} + prod: true + confirm: true diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..dbbe557 --- /dev/null +++ b/vercel.json @@ -0,0 +1,18 @@ +{ + "version": 3, + "builds": [ + { + "src": "package.json", + "use": "@vercel/static-build", + "config": { + "distDir": "dist" + } + } + ], + "routes": [ + { + "src": "/(.*)", + "dest": "/index.html" + } + ] +}