Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

Flutter Web

Flutter Web #11

Workflow file for this run

name: Flutter Web
on:
push:
branches:
- main
jobs:
build:
name: Build Web
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.22.2
- run: flutter config --enable-web
- run: flutter pub get
- name: Generate .env file
run: |
echo "SUPABASE_URL=${SUPABASE_URL}" >> .env
echo "SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}" >> .env
- run: flutter build web --release
# 1. change path which exist lib/main.dart
# working-directory: ./flutter-riverpod-demo
- run: |
# 2. change path to [existed lib/main.dart path]/build/web
cd build/web
git init
# 3. change your email
git config --global user.email [email protected]
# 4. change your name
git config --global user.name suu3
git status
# 5. change your repository
git remote add origin https://suu3:${{ secrets.GIT_ACTION_TOKEN }}@github.com/suu3/flutter-riverpod-demo.git
git checkout -b gh-pages
git add --all
git commit -m "update"
git push origin gh-pages -f