File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : deploy
2
+
3
+ # Run this workflow when a new release is published
4
+ on :
5
+ release :
6
+ types : [published]
7
+ jobs :
8
+ build_and_deploy :
9
+ runs-on : ubuntu-latest # Use the latest version of Ubuntu
10
+
11
+ steps :
12
+ # 1. Checkout the repository code
13
+ - name : Checkout
14
+ uses : actions/checkout@v3
15
+
16
+ # 2. Setup Flutter SDK
17
+ - name : Setup Flutter
18
+ uses : subosito/flutter-action@v2
19
+ with :
20
+ channel : ' stable' # Use the stable channel of Flutter
21
+
22
+ # 3. Get Flutter dependencies
23
+ - name : Get dependencies
24
+ run : flutter pub get
25
+
26
+ # 4. Build the Flutter web app
27
+ - name : Build Web App
28
+ run : flutter build web --release --base-href /ht-main/
29
+
30
+ # 5. Deploy the built app to GitHub Pages
31
+ - name : Deploy
32
+ uses : peaceiris/actions-gh-pages@v3
33
+ with :
34
+ github_token : ${{ secrets.GITHUB_TOKEN }}
35
+ publish_dir : ./build/web
You can’t perform that action at this time.
0 commit comments