diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 765546c..89464fa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -39,7 +39,8 @@ jobs: working-directory: flutter_bird_app run: | flutter build web - cp .env build/web/ + mkdir -p build/web/assets + cp .env build/web/assets/ - name: Set GitHub Deployment Environment id: github_deployment_environment diff --git a/flutter_bird_app/lib/main.dart b/flutter_bird_app/lib/main.dart index 0417545..9f8ab7f 100644 --- a/flutter_bird_app/lib/main.dart +++ b/flutter_bird_app/lib/main.dart @@ -8,7 +8,7 @@ import 'package:flutter_line_liff/flutter_line_liff.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); - await dotenv.load(fileName: ".env"); + await dotenv.load(fileName: "assets/.env"); print("Starting application..."); final bool isInClient = FlutterLineLiff().isInClient; diff --git a/flutter_bird_app/pubspec.yaml b/flutter_bird_app/pubspec.yaml index 9a75847..1c5a040 100644 --- a/flutter_bird_app/pubspec.yaml +++ b/flutter_bird_app/pubspec.yaml @@ -47,7 +47,6 @@ flutter: assets: - images/ - assets/ - - .env fonts: - family: flappy fonts: