diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df0a02d..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 vercel@latest pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - - - name: Build with Vercel - run: npx vercel@latest build --prod --token=${{ secrets.VERCEL_TOKEN }} + - 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 vercel@latest deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} + - 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" + } + ] +}