Skip to content

Commit 88a6a62

Browse files
author
sazardev
committed
Add GitHub Actions workflow for Flutter web deployment
1 parent b9d7f97 commit 88a6a62

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)