Skip to content

Commit 2ba6d8b

Browse files
committed
Update workflow
1 parent 9020600 commit 2ba6d8b

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/flutter_ci_cd.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,29 @@ jobs:
6161
prerelease: false
6262
draft: false
6363
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
66+
build-web:
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v4
71+
72+
- name: Setup Flutter
73+
uses: subosito/flutter-action@v2
74+
with:
75+
channel: 'stable'
76+
77+
- name: Install dependencies
78+
run: flutter pub get
79+
80+
- name: Build Web
81+
# Replace 'YOUR_REPO_NAME' with your actual repository name (e.g., /my-app/)
82+
run: flutter build web --release --base-href "/"
83+
84+
- name: Deploy to GitHub Pages
85+
uses: peaceiris/actions-gh-pages@v4
86+
with:
87+
github_token: ${{ secrets.GITHUB_TOKEN }}
88+
publish_dir: ./build/web
89+
publish_branch: gh-pages

0 commit comments

Comments
 (0)