Skip to content

Commit

Permalink
Add build and deploy actions
Browse files Browse the repository at this point in the history
  • Loading branch information
esDotDev committed Sep 26, 2024
1 parent 31717e4 commit c8cad29
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build_and_deploy_web_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and Stage

on:
workflow_dispatch:

jobs:
build:
uses: ./.github/workflows/build_web.yaml

deploy:
runs-on: ubuntu-latest

steps:
- name: Upload to SFTP
uses: wlixcc/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local_path: ./build/web/*
remote_path: staging.wonderous.app/web
sftp_only: true
20 changes: 5 additions & 15 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Build and Deploy Flutter Web App
name: Build Flutter Web

on:
# push:
# branches:
# - main
workflow_dispatch:

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -27,14 +24,7 @@ jobs:
run: flutter config --enable-web

- name: Build Flutter web app
run: flutter build web --release --wasm
run: flutter build web --wasm

- name: Upload to SFTP
uses: wlixcc/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local_path: build/web/
remote_path: /wonderous.app/web_test/
sftp_only: true
- name: Update base href in index.html
run: sed -i 's|<base href="/">|<base href="/web/">|g' build/web/index.html
12 changes: 0 additions & 12 deletions .github/workflows/tests.yaml

This file was deleted.

0 comments on commit c8cad29

Please sign in to comment.