From 6b1750d8d1d4f2564912e07a5f715a58d045d8d6 Mon Sep 17 00:00:00 2001 From: IANewCool Date: Mon, 11 Aug 2025 19:07:18 -0400 Subject: [PATCH] ci(web): Vercel deploy (Flutter Web) + SPA rewrites --- .github/workflows/web-vercel.yml | 17 +++++++++++++++++ vercel.json | 6 ++++++ 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/web-vercel.yml create mode 100644 vercel.json diff --git a/.github/workflows/web-vercel.yml b/.github/workflows/web-vercel.yml new file mode 100644 index 00000000..b0e07221 --- /dev/null +++ b/.github/workflows/web-vercel.yml @@ -0,0 +1,17 @@ +name: Deploy Web to Vercel +on: + push: + branches: [develop, main] +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: { flutter-version: '3.22.0' } + - run: flutter pub get + - run: flutter build web --release --dart-define=API_BASE=https://api.tunestream.io + - run: npm i -g vercel + # deploy del directorio estático generado por Flutter + - run: vercel deploy --prod build/web --yes --token ${{ secrets.VERCEL_TOKEN }} --name tunestream-app +YAML < /dev/null \ No newline at end of file diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..e321c25d --- /dev/null +++ b/vercel.json @@ -0,0 +1,6 @@ +{ + "cleanUrls": true, + "trailingSlash": false, + "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] +} +JSON < /dev/null \ No newline at end of file