name: deploy

on:
  push:
    branches:
      - main

jobs:
  deploy-dev:
    runs-on: ubuntu-latest
    name: Deploy Development
    steps:
      - uses: actions/checkout@v2
      - uses: subosito/flutter-action@v1.5.0
        with:
          channel: master
      - run: flutter packages get
      - run: flutter build web --web-renderer html --dart-define SHARING_ENABLED=true
      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PHOTOBOOTH_DEV }}"
          projectId: io-photobooth-dev
          expires: 30d
          channelId: live
