Skip to content

Commit

Permalink
Setup github action
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcheung committed Dec 3, 2023
1 parent 5cfed46 commit 720d8ef
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/firebase-hosting-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy to Firebase Hosting
'on':
workflow_call:
inputs:
channelId:
required: true
type: string

jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'

- run: flutter pub get
- run: flutter build web --release

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLUTTER_UI_EXPERIMENT_DEMO }}
channelId: ${{ inputs.channelId }}
projectId: flutter-ui-experiment-demo
11 changes: 11 additions & 0 deletions .github/workflows/firebase-hosting-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Deploy to Firebase Hosting on develop
'on':
push:
branches:
- develop
jobs:
build_and_deploy:
uses: ./.github/workflows/firebase-hosting-deploy.yml
with:
channelId: beta
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/firebase-hosting-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Deploy to Firebase Hosting on develop
'on':
push:
branches:
- main
jobs:
build_and_deploy:
uses: ./.github/workflows/firebase-hosting-deploy.yml
with:
channelId: live
secrets: inherit

0 comments on commit 720d8ef

Please sign in to comment.