-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.18 KB
/
build-deploy.yml
File metadata and controls
42 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deploy Flutter Web App to GitHub Pages
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.26.0-0.1.pre' # 원하는 Flutter 버전으로 변경
channel: beta # 채널도 beta로 설정
- name: Install Dependencies
run: flutter pub get
- name: Create lib/api_key.dart with Kakao API Keys
run: |
echo "String kakaoNativeAppKey = '${{ secrets.KAKAO_NATIVE_APP_KEY }}';" > lib/api_key.dart
echo "String kakaoJavascriptKey = '${{ secrets.KAKAO_JAVASCRIPT_KEY }}';" >> lib/api_key.dart
- name: Build Web
run: flutter build web --release
- name: Add .nojekyll
run: echo > build/web/.nojekyll
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.MY_SECRET_KEY_NAME }} # repository에서 사용할 시크릿 키 이름
publish_dir: build/web
publish_branch: gh-pages
cname: tradule.com