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

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
suu3 authored Jul 10, 2024
1 parent 1a72de7 commit c16e999
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Flutter Web

on:
push:
branches:
- main

jobs:
build:
name: Build Web
Expand All @@ -11,31 +13,35 @@ jobs:
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.22.2
flutter-version: '3.22.2'
- run: flutter config --enable-web
- run: flutter pub get
- name: Generate .env file
run: |
cat > assets/.env <<EOF
SUPABASE_URL=${SUPABASE_URL}
SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}
EOF
- run: flutter build web --release
echo "SUPABASE_URL=${SUPABASE_URL}" >> .env
echo "SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}" >> .env
- name: Copy .env to assets
run: |
mkdir -p assets/env
cp .env assets/env/.env
- name: Build Web
run: flutter build web --release
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
FLUTTER_ROOT: /opt/hostedtoolcache/flutter/stable-3.22.2-x64
PUB_CACHE: /home/runner/.pub-cache
- 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 config --global user.email "[email protected]" # 변경된 이메일
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 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"
Expand Down

0 comments on commit c16e999

Please sign in to comment.