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

Update deploy.yml

Update deploy.yml #16

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@v2
- 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
- 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: |
cd build/web
git init
git config --global user.email "[email protected]" # 변경된 이메일
git config --global user.name "suu3" # 변경된 이름
git status
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