diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 4fe9c4f..8809c1e 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -10,13 +10,34 @@ jobs: build_and_deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - run: npm ci - - uses: FirebaseExtended/action-hosting-deploy@v0 + - uses: actions/checkout@v5 + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.35.3' + channel: 'stable' + - name: Install dependencies + run: | + cd ui + flutter pub get + - name: Build Flutter web app + run: | + cd ui + flutter build web --release + - name: Configure Firebase target + run: | + cd ui + npx firebase-tools@latest target:apply hosting ui ui-proj-a684b + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_UI_PROJ_A684B }} + - name: Deploy to Firebase Hosting + uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: ${{ secrets.GITHUB_TOKEN }} firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_UI_PROJ_A684B }} channelId: live projectId: ui-proj-a684b + target: ui + entryPoint: ui env: FIREBASE_CLI_EXPERIMENTS: webframeworks diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 596b52c..ea65dfd 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -12,7 +12,7 @@ jobs: if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: npm ci - uses: FirebaseExtended/action-hosting-deploy@v0 with: diff --git a/ui/.firebaserc b/ui/.firebaserc index 8e1875d..a614a16 100644 --- a/ui/.firebaserc +++ b/ui/.firebaserc @@ -1,5 +1,15 @@ { "projects": { "default": "ui-proj-a684b" - } -} + }, + "targets": { + "ui-proj-a684b": { + "hosting": { + "ui": [ + "ui-proj-a684b" + ] + } + } + }, + "etags": {} +} \ No newline at end of file diff --git a/ui/firebase.json b/ui/firebase.json index 6b6b8c2..75b76c4 100644 --- a/ui/firebase.json +++ b/ui/firebase.json @@ -1,35 +1,19 @@ { - "flutter": { - "platforms": { - "macos": { - "default": { - "projectId": "ui-proj-a684b", - "appId": "1:548317788995:ios:91bde8a7b93af4c7e00df6", - "uploadDebugSymbols": false, - "fileOutput": "macos/Runner/GoogleService-Info.plist" + "hosting": [ + { + "target": "ui", + "public": "build/web", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" } - }, - "dart": { - "lib/firebase_options.dart": { - "projectId": "ui-proj-a684b", - "configurations": { - "macos": "1:548317788995:ios:91bde8a7b93af4c7e00df6", - "web": "1:548317788995:web:5c7568a1a8cccb7fe00df6", - "windows": "1:548317788995:web:b248d7f6143fbfe1e00df6" - } - } - } - } - }, - "hosting": { - "source": ".", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], - "frameworksBackend": { - "region": "us-west1" + ] } - } + ] }