~repos /only-bible-app
git clone https://pyrossh.dev/repos/only-bible-app.git
The only bible app you will ever need. No ads. No in-app purchases. No distractions.
26486e27
—
pyrossh 2 years ago
add firebase deploy
- .github/workflows/firebase-hosting-merge.yml +7 -3
- .github/workflows/firebase-hosting-pull-request.yml +0 -17
- .gitignore +2 -1
- README.md +9 -1
- lib/app.dart +11 -11
.github/workflows/firebase-hosting-merge.yml
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
# This file was auto-generated by the Firebase CLI
|
|
2
|
-
# https://github.com/firebase/firebase-tools
|
|
3
|
-
|
|
4
1
|
name: Deploy to Firebase Hosting on merge
|
|
5
2
|
'on':
|
|
6
3
|
push:
|
|
@@ -11,6 +8,13 @@ jobs:
|
|
|
11
8
|
runs-on: ubuntu-latest
|
|
12
9
|
steps:
|
|
13
10
|
- uses: actions/checkout@v3
|
|
11
|
+
- uses: subosito/flutter-action@v2
|
|
12
|
+
with:
|
|
13
|
+
flutter-version: '3.10.6'
|
|
14
|
+
channel: 'stable'
|
|
15
|
+
cache: true
|
|
16
|
+
- run: flutter --version
|
|
17
|
+
- run: flutter pub get
|
|
14
18
|
- run: flutter build web
|
|
15
19
|
- uses: FirebaseExtended/action-hosting-deploy@v0
|
|
16
20
|
with:
|
.github/workflows/firebase-hosting-pull-request.yml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by the Firebase CLI
|
|
2
|
-
# https://github.com/firebase/firebase-tools
|
|
3
|
-
|
|
4
|
-
name: Deploy to Firebase Hosting on PR
|
|
5
|
-
'on': pull_request
|
|
6
|
-
jobs:
|
|
7
|
-
build_and_preview:
|
|
8
|
-
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v3
|
|
12
|
-
- run: flutter build web
|
|
13
|
-
- uses: FirebaseExtended/action-hosting-deploy@v0
|
|
14
|
-
with:
|
|
15
|
-
repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
|
16
|
-
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ONLY_BIBLE_APP }}'
|
|
17
|
-
projectId: only-bible-app
|
.gitignore
CHANGED
|
@@ -43,4 +43,5 @@ app.*.map.json
|
|
|
43
43
|
/android/app/profile
|
|
44
44
|
/android/app/release
|
|
45
45
|
scripts/Bible-Database
|
|
46
|
-
scripts/audio
|
|
46
|
+
scripts/audio
|
|
47
|
+
.firebase
|
README.md
CHANGED
|
@@ -27,6 +27,7 @@ dart run flutter_native_splash:create
|
|
|
27
27
|
```agsl
|
|
28
28
|
flutter clean
|
|
29
29
|
flutter run
|
|
30
|
+
firebase emulators:start
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
## Test
|
|
@@ -38,4 +39,11 @@ flutter test
|
|
|
38
39
|
```agsl
|
|
39
40
|
flutter build web
|
|
40
41
|
firebase deploy
|
|
41
|
-
```
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Web
|
|
45
|
+
```agsl
|
|
46
|
+
https://only-bible-app.web.app
|
|
47
|
+
https://only-bible-app.firebaseapp.app
|
|
48
|
+
https://onlybible.app
|
|
49
|
+
```
|
lib/app.dart
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "package:flutter/material.dart";
|
|
2
|
-
import
|
|
2
|
+
import "package:flutter_gen/gen_l10n/app_localizations.dart";
|
|
3
|
-
import
|
|
3
|
+
import "package:flutter_reactive_value/flutter_reactive_value.dart";
|
|
4
|
-
import
|
|
4
|
+
import "package:go_router/go_router.dart";
|
|
5
|
-
import
|
|
5
|
+
import "package:only_bible_app/routes/home_screen.dart";
|
|
6
|
-
import
|
|
6
|
+
import "package:only_bible_app/state.dart";
|
|
7
|
-
import
|
|
7
|
+
import "package:only_bible_app/widgets/sidebar.dart";
|
|
8
|
-
import
|
|
8
|
+
import "package:only_bible_app/theme.dart";
|
|
9
9
|
|
|
10
10
|
class App extends StatelessWidget {
|
|
11
11
|
const App({super.key});
|
|
@@ -48,10 +48,10 @@ class App extends StatelessWidget {
|
|
|
48
48
|
},
|
|
49
49
|
routes: [
|
|
50
50
|
GoRouteData.$route(
|
|
51
|
-
path:
|
|
51
|
+
path: "/:book/:chapter",
|
|
52
52
|
factory: (GoRouterState state) => HomeScreen(
|
|
53
|
-
book: state.pathParameters[
|
|
53
|
+
book: state.pathParameters["book"]!,
|
|
54
|
-
chapter: int.parse(state.pathParameters[
|
|
54
|
+
chapter: int.parse(state.pathParameters["chapter"]!),
|
|
55
55
|
),
|
|
56
56
|
),
|
|
57
57
|
],
|