diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index b0d5ff2..65a7d42 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -3,7 +3,7 @@ name: Basic Flutter CI on: pull_request: branches: - - '**' + - 'main' jobs: build: @@ -42,7 +42,7 @@ jobs: - name: Run tests run: flutter test - # Build apk. + # Build web - name: Build web run: flutter build web --web-renderer html \ No newline at end of file diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 0000000..a7c139c --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -0,0 +1,32 @@ +name: Deploy to Firebase Hosting on create Tag + +on: + pull_request: + branches: + - 'test' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Java + uses: actions/setup-java@v1 + with: + java-version: '12.x' + + - name: Setup Flutter + uses: subosito/flutter-action@v1 + with: + flutter-version: '2.10.3' + + - name: Build Web + run: flutter build web --web-renderer html + + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROJECT_ZERO_384AD }}' + projectId: project-zero-384ad