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