Initial commit #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Flutter Web Application | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Flutter | |
uses: flutter-actions/setup-flutter@v3 | |
with: | |
flutter-version: 'latest' | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Build web | |
run: flutter build web --release --wasm | |
- name: Deploy to static branch | |
run: | | |
git config --global user.name github-actions | |
git config --global user.email [email protected] | |
git checkout --orphan static | |
git rm -rf . | |
mv build/web/* . | |
git add . | |
git commit -m "Deploy Flutter web app" | |
git push -f origin static |