Skip to content

Add distribute sample_app github pages (#12) #1

Add distribute sample_app github pages (#12)

Add distribute sample_app github pages (#12) #1

name: App Distribute CI
on:
push:
branches:
- main
release:
types: [published]
workflow_dispatch:
inputs:
flavor:
type: choice
description: Build flavor
options:
- beta
- prod
build_web:
type: boolean
description: Web
default: true
env:
FLUTTER_VERSION: "3.35.2"
FLUTTER_CHANNEL: stable
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_deploy_web:
name: Build and Deploy Dogfooding Web
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ github.event_name == 'push' || github.event_name == 'release' || inputs.build_web == true }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: config git
run: |
git config --global user.email "$(git log --format='%ae' HEAD^!)"
git config --global user.name "$(git log --format='%an' HEAD^!)"
git fetch origin gh-pages:gh-pages
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Build and Deploy
uses: bluefireteam/flutter-gh-pages@v9
with:
baseHref: /stream-feeds-flutter/
workingDir: sample_app