From df89b894a3d1f7e691fc1831c4884ae72854ab91 Mon Sep 17 00:00:00 2001 From: Jaime <52668514+jsgalarraga@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:49:18 +0100 Subject: [PATCH] chore: add workflow to deploy app in development env (#22) * feat: add execution permissions * feat: initialize firebase hosting * feat: first deploy updated gitignore * chore: add deploy app dev workflow --- .firebaserc | 15 ++++++++++++++ .github/workflows/deploy_app_dev.yaml | 28 +++++++++++++++++++++++++++ .gitignore | 6 +++--- firebase.json | 14 ++++++++++++++ scripts/start_local_api.sh | 0 5 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 .firebaserc create mode 100644 .github/workflows/deploy_app_dev.yaml create mode 100644 firebase.json mode change 100644 => 100755 scripts/start_local_api.sh diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 000000000..c6d351299 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,15 @@ +{ + "projects": { + "default": "io-crossword-dev" + }, + "targets": { + "io-crossword-dev": { + "hosting": { + "app_dev": [ + "e7b2896c65fabc0480edc6c0e" + ] + } + } + }, + "etags": {} +} \ No newline at end of file diff --git a/.github/workflows/deploy_app_dev.yaml b/.github/workflows/deploy_app_dev.yaml new file mode 100644 index 000000000..ebfc0b281 --- /dev/null +++ b/.github/workflows/deploy_app_dev.yaml @@ -0,0 +1,28 @@ +name: deploy_app_dev + +on: + push: + branches: + - main + +jobs: + deploy-dev: + runs-on: ubuntu-latest + name: Deploy App Development + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter packages get + - run: flutter build web --web-renderer canvaskit -t lib/main_development.dart + + + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: "${{ secrets.GITHUB_TOKEN }}" + firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEV }}" + projectId: io-crossword-dev + target: app_dev + expires: 30d + channelId: live diff --git a/.gitignore b/.gitignore index 25a05ff9f..b97954725 100644 --- a/.gitignore +++ b/.gitignore @@ -89,9 +89,6 @@ coverage/ # Submodules packages/**/pubspec.lock -# Web related -lib/generated_plugin_registrant.dart - # Symbolication related app.*.symbols @@ -110,3 +107,6 @@ app.*.map.json !.idea/codeStyles/ !.idea/dictionaries/ !.idea/runConfigurations/ + +# Firebase related +.firebase/ diff --git a/firebase.json b/firebase.json new file mode 100644 index 000000000..c73cc6d5f --- /dev/null +++ b/firebase.json @@ -0,0 +1,14 @@ +{ + "hosting": [ + { + "target": "app_dev", + "public": "build/web", + "ignore": [ + ".firebase", + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } + ] +} diff --git a/scripts/start_local_api.sh b/scripts/start_local_api.sh old mode 100644 new mode 100755