Skip to content

Commit 5914fd8

Browse files
committed
feat: github page 배포를 위한 github action 세팅
1 parent 48a37cd commit 5914fd8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/web-deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: deploy flutter web to github pages
2+
3+
on:
4+
# main branch에 푸쉬가 들어올 경우 실행
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# git 기본 세팅
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
# 플러터 세팅
18+
- name: Setup flutter
19+
uses: subosito/flutter-action@v2
20+
with:
21+
channel: stable
22+
flutter-version: 3.29.2
23+
24+
# 추가: 의존성 설치
25+
- name: Install dependencies
26+
run: flutter pub get
27+
28+
# 플러터 웹 빌드
29+
- name: Build web
30+
run: flutter build web --base-href "/${{ github.event.repository.name }}/"
31+
32+
# github page 배포
33+
- name: Deploy to github pages
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
github_token: ${{ secrets.STATIC_DEPLOY_KEY }}
37+
publish_dir: ./build/web

0 commit comments

Comments
 (0)