Skip to content

Commit c8cad29

Browse files
committed
Add build and deploy actions
1 parent 31717e4 commit c8cad29

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build and Stage
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
uses: ./.github/workflows/build_web.yaml
9+
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Upload to SFTP
15+
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
16+
with:
17+
server: ${{ secrets.FTP_SERVER }}
18+
username: ${{ secrets.FTP_USERNAME }}
19+
password: ${{ secrets.FTP_PASSWORD }}
20+
local_path: ./build/web/*
21+
remote_path: staging.wonderous.app/web
22+
sftp_only: true

.github/workflows/build_web.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
name: Build and Deploy Flutter Web App
1+
name: Build Flutter Web
22

33
on:
4-
# push:
5-
# branches:
6-
# - main
74
workflow_dispatch:
85

96
jobs:
10-
build-and-deploy:
7+
build:
118
runs-on: ubuntu-latest
129

1310
steps:
@@ -27,14 +24,7 @@ jobs:
2724
run: flutter config --enable-web
2825

2926
- name: Build Flutter web app
30-
run: flutter build web --release --wasm
27+
run: flutter build web --wasm
3128

32-
- name: Upload to SFTP
33-
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
34-
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
29+
- name: Update base href in index.html
30+
run: sed -i 's|<base href="/">|<base href="/web/">|g' build/web/index.html

.github/workflows/tests.yaml

-12
This file was deleted.

0 commit comments

Comments
 (0)