Update flutter.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flutter | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
flutter-version: 3.22.1 | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Build | |
run: flutter build web | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Export Firebase key | |
run: echo $GOOGLE_SERVICE_ACCOUNT_DATA > $HOME/gcloud.json | |
- name: Reference Firebase key | |
run: export GOOGLE_APPLICATION_CREDENTIALS=$HOME/gcloud.json | |
- name: Deploy to Firebase | |
uses: w9jds/firebase-action@master | |
with: | |
args: --only hosting:gerafrequencia --project theahert | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |