Closed justyn closed 1 year ago
I fixed this by adding the flutter-action GitHub Action.
So my firebase-hosting-merge.yml
now looks like this:
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.3'
channel: 'stable'
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_LANGUAGEBUTLER }}'
channelId: live
projectId: languagebutler
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
Presumably this should be added automatically when the file is created with firebase init hosting
so I think this is a bug with that tool, rather than this one.
I've created a new Github Action to deploy on merge using
firebase init hosting
locally.After pushing to GH and the build failing, I then added the env
FIREBASE_CLI_EXPERIMENTS: webframeworks
, as directed by the build error.However, the build still fails, now with the error
Error: Flutter CLI not found, follow the instructions here https://docs.flutter.dev/get-started/install before trying again.
Config and build output below
Action config
Error message
Github Actions build output for step
Run FirebaseExtended/action-hosting-deploy@v0
Expected behavior
It should publish to Firebase Hosting
Actual behavior
It fails