Skip to content

Commit 8666e00

Browse files
authored
feat: deploy flutter web (#871)
1 parent ab3554b commit 8666e00

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

.github/workflows/app-distribute.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ on:
2121
type: boolean
2222
description: Android
2323
default: true
24+
build_web:
25+
type: boolean
26+
description: Web
27+
default: true
2428

2529
env:
2630
FLUTTER_VERSION: "3.29.0"
@@ -151,3 +155,31 @@ jobs:
151155
run: |
152156
cd dogfooding/android
153157
bundle exec fastlane android build_and_deploy flavor:${{ env.FLAVOR }}
158+
159+
build_and_deploy_web:
160+
name: Build and Deploy Dogfooding Web
161+
runs-on: ubuntu-latest
162+
timeout-minutes: 10
163+
if: ${{ github.event_name == 'push' || inputs.build_web == true }}
164+
steps:
165+
- name: Checkout code
166+
uses: actions/checkout@v3
167+
168+
- name: config git
169+
run: |
170+
git config --global user.email "$(git log --format='%ae' HEAD^!)"
171+
git config --global user.name "$(git log --format='%an' HEAD^!)"
172+
git fetch origin gh-pages:gh-pages
173+
174+
- name: Setup Flutter
175+
uses: subosito/flutter-action@v2
176+
with:
177+
cache: true
178+
channel: ${{ env.FLUTTER_CHANNEL }}
179+
flutter-version: ${{ env.FLUTTER_VERSION }}
180+
181+
- name: Build and Deploy
182+
uses: bluefireteam/flutter-gh-pages@v9
183+
with:
184+
baseHref: /stream-video-flutter/
185+
workingDir: dogfooding

dogfooding/lib/utils/consts.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ bool get kIsProd => switch (appFlavor) {
99
'dev' => false,
1010
'beta' => false,
1111
'prod' => true,
12-
_ => throw ArgumentError(
13-
'Flavors are required. Supported are dev, beta and prod'),
12+
_ => true,
1413
};

0 commit comments

Comments
 (0)