Skip to content

Commit 56d6a60

Browse files
authored
Merge pull request #8 from Holbiwan/dev-v1
Add GitHub Action for Flutter web deployment
2 parents f94192b + 9ff4d91 commit 56d6a60

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/flutter-web.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Flutter Web Build and Deploy
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: subosito/flutter-action@v2
16+
with:
17+
flutter-version: '3.24.0'
18+
channel: 'stable'
19+
20+
- name: Install dependencies
21+
run: flutter pub get
22+
23+
- name: Enable web
24+
run: flutter config --enable-web
25+
26+
- name: Add web platform
27+
run: flutter create . --platforms web
28+
29+
- name: Build web
30+
run: flutter build web --release --web-renderer html
31+
32+
- name: Deploy to GitHub Pages
33+
uses: peaceiris/actions-gh-pages@v3
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./build/web

0 commit comments

Comments
 (0)