From fe748db1ec56e8bbe90dd58b810b76c3798e91b4 Mon Sep 17 00:00:00 2001 From: Cavin Date: Wed, 26 Aug 2026 23:16:06 +0300 Subject: [PATCH 1/4] fix(vercel) spa routing for vite --- vercel.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..072cd7d --- /dev/null +++ b/vercel.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "rewrites": [ + { + "source": "/(.*)", + "destination": "/index.html" + } + ] +} From 5b3bb0c02d31b11bf27aa3b8c757337c9d4b871f Mon Sep 17 00:00:00 2001 From: Cavin Date: Thu, 27 Aug 2026 00:04:53 +0300 Subject: [PATCH 2/4] ci: trigger Vercel deploy via hook after successful build --- .github/workflows/ci.yaml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8ba31cf..1823a04 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,25 +1,28 @@ -name: Frontend CI +name: CI on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] + branches: + - main jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 24 cache: npm cache-dependency-path: package-lock.json - - run: npm ci + - name: Install dependencies + run: npm ci - name: Lint run: npm run lint @@ -33,4 +36,8 @@ jobs: - name: Build run: npm run build env: - VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL }} \ No newline at end of file + VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL }} + + - name: Deploy to Vercel + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + run: curl -X POST "${{ secrets.VERCEL_DEPLOY_HOOK }}" \ No newline at end of file From 13d8f996d37de06279411fa36f1eb6cfd5107e4d Mon Sep 17 00:00:00 2001 From: Cavin Date: Thu, 27 Aug 2026 00:14:53 +0300 Subject: [PATCH 3/4] fix(ci): update Vercel deployment step in CI workflow --- .github/workflows/ci.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1823a04..aa86de1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,6 +38,11 @@ jobs: env: VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL }} + deploy: + needs: build + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + + steps: - name: Deploy to Vercel - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - run: curl -X POST "${{ secrets.VERCEL_DEPLOY_HOOK }}" \ No newline at end of file + run: curl -X POST "${{ secrets.VERCEL_DEPLOY_HOOK }}" From a68138783605b1b484201bca988171ab62e1dc9a Mon Sep 17 00:00:00 2001 From: Cavin Date: Thu, 27 Aug 2026 00:29:28 +0300 Subject: [PATCH 4/4] fix(vercel): disable automatic git deployment for vercel --- vercel.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 072cd7d..3d5f985 100644 --- a/vercel.json +++ b/vercel.json @@ -5,5 +5,8 @@ "source": "/(.*)", "destination": "/index.html" } - ] + ], + "git": { + "deploymentEnabled": false + } }