Skip to content

Add folder design principles #15

Add folder design principles

Add folder design principles #15

Workflow file for this run

name: Deploy Flutter Web to flutterui-webapp
on:
push:
branches:
- main # Change if using a different branch
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout flutterui repository
uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.27.1 # Adjust based on your Flutter version
- name: Cache Flutter dependencies
uses: actions/cache@v2
with:
path: |
~/.pub-cache
key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-cache-
- name: Clean up
run: flutter clean
- name: Install dependencies
run: flutter pub get
- name: Build Flutter web
run: flutter build web --release
- name: Checkout flutterui-webapp repository
run: |
git clone https://github.com/HauTranCong/flutterui-webapp deploy_repo
rm -rf deploy_repo/*
cp -r build/web/* deploy_repo/
cd deploy_repo
git config user.name "github-actions"
git config user.email "[email protected]"
git add .
git commit -m "Auto-deploy from flutterui"
git push https://HauTrancong:${{ secrets.DEPLOY_TOKEN }}@github.com/HauTrancong/flutterui-webapp.git main