File tree Expand file tree Collapse file tree 4 files changed +80
-27
lines changed Expand file tree Collapse file tree 4 files changed +80
-27
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy (Live!)
2+
3+ on :
4+ workflow_dispatch :
5+
6+ env :
7+ BASE_HREF : " web"
8+ REMOTE_DIR : " web"
9+ jobs :
10+ build :
11+ uses : ./.github/workflows/build_web.yml
12+
13+ deploy :
14+ needs : build
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Download build artifact
19+ uses : actions/download-artifact@v4
20+ with :
21+ name : web-build
22+ path : build/web
23+
24+ - name : Update base href in index.html
25+ run : sed -i 's|<base href="/">|<base href="/${{ env.BASE_HREF }}/">|g' build/web/index.html
26+
27+ - name : Upload to SFTP
28+ 29+ with :
30+ server : ${{ secrets.FTP_SERVER }}
31+ username : ${{ secrets.FTP_USERNAME }}
32+ password : ${{ secrets.FTP_PASSWORD }}
33+ local_path : ./build/web/*
34+ remote_path : wonderous.app/${{ env.REMOTE_DIR }}
35+ sftp_only : true
Original file line number Diff line number Diff line change 1+ name : Build and Stage
2+
3+ on :
4+ workflow_dispatch :
5+
6+ env :
7+ BASE_HREF : " web-staging"
8+ REMOTE_DIR : " web-staging"
9+ jobs :
10+ build :
11+ uses : ./.github/workflows/build_web.yml
12+
13+ deploy :
14+ needs : build
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Download build artifact
19+ uses : actions/download-artifact@v4
20+ with :
21+ name : web-build
22+ path : build/web
23+
24+ - name : Update base href in index.html
25+ run : sed -i 's|<base href="/">|<base href="/${{ env.BASE_HREF }}/">|g' build/web/index.html
26+
27+ - name : Upload to SFTP
28+ 29+ with :
30+ server : ${{ secrets.FTP_SERVER }}
31+ username : ${{ secrets.FTP_USERNAME }}
32+ password : ${{ secrets.FTP_PASSWORD }}
33+ local_path : ./build/web/*
34+ remote_path : wonderous.app/${{ env.REMOTE_DIR }}
35+ sftp_only : true
Original file line number Diff line number Diff line change 1- name : Build and Deploy Flutter Web App
1+ name : Build Flutter Web
22
33on :
4- # push:
5- # branches:
6- # - main
74 workflow_dispatch :
8-
5+ workflow_call :
6+
97jobs :
10- build-and-deploy :
8+ build :
119 runs-on : ubuntu-latest
1210
1311 steps :
@@ -27,14 +25,11 @@ jobs:
2725 run : flutter config --enable-web
2826
2927 - name : Build Flutter web app
30- run : flutter build web --release -- wasm
28+ run : flutter build web --wasm
3129
32- - name : Upload to SFTP
33- 30+ - name : Upload build artifact
31+ uses : actions/upload-artifact@v4
3432 with :
35- server : ${{ secrets.FTP_SERVER }}
36- username : ${{ secrets.FTP_USERNAME }}
37- password : ${{ secrets.FTP_PASSWORD }}
38- local_path : build/web/
39- remote_path : /wonderous.app/web_test/
40- sftp_only : true
33+ name : web-build
34+ path : build/web
35+ retention-days : 1 # Adjust as needed
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments