Skip to content

Commit 69a19b0

Browse files
committed
update vercel.json, fix deploy error
1 parent b275a3d commit 69a19b0

2 files changed

Lines changed: 7 additions & 21 deletions

File tree

.github/workflows/deploy-mobile.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ on:
1212
jobs:
1313
deploy:
1414
runs-on: ubuntu-latest
15-
defaults:
16-
run:
17-
working-directory: shatter-mobile
1815

1916
steps:
2017
- name: Checkout repository
@@ -28,24 +25,19 @@ jobs:
2825
cache-dependency-path: shatter-mobile/package-lock.json
2926

3027
- name: Install dependencies
28+
working-directory: shatter-mobile
3129
run: npm ci
3230

33-
- name: Build Expo web export
34-
env:
35-
EXPO_PUBLIC_API_URL: https://techstart-shatter-backend.vercel.app
36-
run: npx expo export -p web
37-
3831
- name: Install Vercel CLI
3932
run: npm install -g vercel
4033

41-
- name: Deploy to Vercel (preview on PR, prod on main)
34+
- name: Build and Deploy to Vercel
35+
working-directory: shatter-mobile
4236
env:
37+
EXPO_PUBLIC_API_URL: https://techstart-shatter-backend.vercel.app
4338
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
4439
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID_MOBILE }}
4540
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_MOBILE }}
4641
run: |
47-
if [ "${{ github.event_name }}" == "push" ]; then
48-
vercel deploy --prod --yes --token=$VERCEL_TOKEN
49-
else
50-
vercel deploy --yes --token=$VERCEL_TOKEN
51-
fi
42+
npx expo export --platform web
43+
vercel deploy --prod --yes --token=$VERCEL_TOKEN

shatter-mobile/vercel.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
{
2-
"buildCommand": null,
3-
"outputDirectory": "dist",
4-
"framework": null,
5-
"rewrites": [
6-
{ "source": "/api/(.*)", "destination": "https://techstart-shatter-backend.vercel.app/api/$1" },
7-
{ "source": "/(.*)", "destination": "/index.html" }
8-
]
2+
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
93
}

0 commit comments

Comments
 (0)