Skip to content

Change href for webapp deployment #3

Change href for webapp deployment

Change href for webapp deployment #3

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: 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