Skip to content

Commit fb221f3

Browse files
committed
Rename CI workflow to test-deploy
- Rename .github/workflows/ci.yml to test-deploy.yml for better clarity
1 parent 5ca1705 commit fb221f3

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: Test & Deploy
22

33
on:
44
push:
@@ -44,6 +44,25 @@ jobs:
4444
name: server-build
4545
path: server/dist
4646

47+
deploy-server:
48+
name: Deploy Server (traceoffapi)
49+
runs-on: ubuntu-latest
50+
needs: test-server
51+
if: github.ref == 'refs/heads/main'
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: actions/download-artifact@v4
55+
with:
56+
name: server-build
57+
path: server/dist
58+
- name: Deploy to Vercel
59+
run: |
60+
npx vercel deploy --prod \
61+
--token=${{ secrets.VERCEL_TOKEN }} \
62+
--scope=${{ secrets.VERCEL_ORG_ID }} \
63+
--project=${{ secrets.VERCEL_PROJECT_API_ID }} \
64+
--cwd server
65+
4766
test-mobile:
4867
name: Test Mobile App
4968
runs-on: ubuntu-latest
@@ -78,3 +97,27 @@ jobs:
7897
with:
7998
name: app-release-apk
8099
path: mobile/build/app/outputs/flutter-apk/app-release.apk
100+
101+
deploy-web:
102+
name: Deploy Flutter Web (traceoff)
103+
runs-on: ubuntu-latest
104+
needs: test-mobile
105+
if: github.ref == 'refs/heads/main'
106+
steps:
107+
- uses: actions/checkout@v4
108+
- uses: subosito/flutter-action@v2
109+
with:
110+
flutter-version: 3.35.3
111+
channel: stable
112+
cache: true
113+
- working-directory: mobile
114+
run: |
115+
flutter pub get
116+
flutter build web --release
117+
- name: Deploy to Vercel
118+
run: |
119+
npx vercel deploy --prod \
120+
--token=${{ secrets.VERCEL_TOKEN }} \
121+
--scope=${{ secrets.VERCEL_ORG_ID }} \
122+
--project=${{ secrets.VERCEL_PROJECT_WEB_ID }} \
123+
--cwd mobile/build/web

0 commit comments

Comments
 (0)