diff --git a/.github/workflows/build_and_deploy_web_staging.yml b/.github/workflows/build_and_deploy_web_staging.yml new file mode 100644 index 00000000..51f6637b --- /dev/null +++ b/.github/workflows/build_and_deploy_web_staging.yml @@ -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/SFTP-Deploy-Action@v1.2.4 + 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 diff --git a/.github/workflows/build_web.yml b/.github/workflows/build_web.yml index 668f356b..5c3a9883 100644 --- a/.github/workflows/build_web.yml +++ b/.github/workflows/build_web.yml @@ -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: @@ -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/SFTP-Deploy-Action@v1.2.4 - 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|||g' build/web/index.html diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index 9704dacf..00000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: tests -on: - workflow_dispatch: - -jobs: - tests_self_hosted: - runs-on: [self-hosted, macos] - steps: - - uses: actions/checkout@v3 - - uses: subosito/flutter-action@v2 - - run: flutter test - - run: flutter test -d macos integration_test/smoke_test.dart