Add GitHub Action for Firebase Hosting deployment #1
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: Firebase Hosting Deploy | |
on: | |
push: | |
branches: | |
- main # Trigger on pushes to the main branch. Change this as needed. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.19.0' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Build Flutter Web | |
run: flutter build web | |
- name: Deploy to Firebase Hosting | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
run: | | |
npm install -g firebase-tools | |
firebase deploy --only hosting --project composites-ai |