Skip to content

Commit 17bb0fc

Browse files
committed
Fixed UI workflow
1 parent 9bcece0 commit 17bb0fc

File tree

3 files changed

+50
-35
lines changed

3 files changed

+50
-35
lines changed

.github/workflows/firebase-hosting-merge.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,33 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- run: npm ci
15-
- uses: FirebaseExtended/action-hosting-deploy@v0
14+
- name: Setup Flutter
15+
uses: subosito/flutter-action@v2
16+
with:
17+
flutter-version: '3.35.3'
18+
channel: 'stable'
19+
- name: Install dependencies
20+
run: |
21+
cd ui
22+
flutter pub get
23+
- name: Build Flutter web app
24+
run: |
25+
cd ui
26+
flutter build web --release
27+
- name: Configure Firebase target
28+
run: |
29+
cd ui
30+
npx firebase-tools@latest target:apply hosting ui ui-proj-a684b
31+
env:
32+
FIREBASE_TOKEN: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_UI_PROJ_A684B }}
33+
- name: Deploy to Firebase Hosting
34+
uses: FirebaseExtended/action-hosting-deploy@v0
1635
with:
1736
repoToken: ${{ secrets.GITHUB_TOKEN }}
1837
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_UI_PROJ_A684B }}
1938
channelId: live
2039
projectId: ui-proj-a684b
40+
target: ui
41+
entryPoint: ui
2142
env:
2243
FIREBASE_CLI_EXPERIMENTS: webframeworks

ui/.firebaserc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"projects": {
33
"default": "ui-proj-a684b"
4-
}
5-
}
4+
},
5+
"targets": {
6+
"ui-proj-a684b": {
7+
"hosting": {
8+
"ui": [
9+
"ui-proj-a684b"
10+
]
11+
}
12+
}
13+
},
14+
"etags": {}
15+
}

ui/firebase.json

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,19 @@
11
{
2-
"flutter": {
3-
"platforms": {
4-
"macos": {
5-
"default": {
6-
"projectId": "ui-proj-a684b",
7-
"appId": "1:548317788995:ios:91bde8a7b93af4c7e00df6",
8-
"uploadDebugSymbols": false,
9-
"fileOutput": "macos/Runner/GoogleService-Info.plist"
2+
"hosting": [
3+
{
4+
"target": "ui",
5+
"public": "build/web",
6+
"ignore": [
7+
"firebase.json",
8+
"**/.*",
9+
"**/node_modules/**"
10+
],
11+
"rewrites": [
12+
{
13+
"source": "**",
14+
"destination": "/index.html"
1015
}
11-
},
12-
"dart": {
13-
"lib/firebase_options.dart": {
14-
"projectId": "ui-proj-a684b",
15-
"configurations": {
16-
"macos": "1:548317788995:ios:91bde8a7b93af4c7e00df6",
17-
"web": "1:548317788995:web:5c7568a1a8cccb7fe00df6",
18-
"windows": "1:548317788995:web:b248d7f6143fbfe1e00df6"
19-
}
20-
}
21-
}
22-
}
23-
},
24-
"hosting": {
25-
"source": ".",
26-
"ignore": [
27-
"firebase.json",
28-
"**/.*",
29-
"**/node_modules/**"
30-
],
31-
"frameworksBackend": {
32-
"region": "us-west1"
16+
]
3317
}
34-
}
18+
]
3519
}

0 commit comments

Comments
 (0)