Skip to content

web deploy

web deploy #3

Workflow file for this run

name: Deploy Cooketh Flow Web
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.29.2'
channel: 'stable'
- name: Enable web support
run: flutter config --enable-web
- name: Install dependencies
run: flutter pub get
- name: Build web
run: flutter build web --release
- name: Debug build output
run: |
ls -la
ls -la build/web || echo "build/web directory not found"
- name: Create or update web branch
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -B web
rm -rf ./*
cp -r build/web/* .
git add .
git commit -m "Deploy web build" || echo "No changes to commit"
git push origin web --force