Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
esDotDev committed Sep 26, 2024
1 parent b347417 commit 81a9aa7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build_and_deploy_web_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build and Stage
on:
workflow_dispatch:

env:
BASE_HREF: "web-staging"
REMOTE_DIR: "web-staging"
jobs:
build:
uses: ./.github/workflows/build_web.yml
Expand All @@ -17,13 +20,16 @@ jobs:
with:
name: web-build
path: build/web


- name: Update base href in index.html
run: sed -i 's|<base href="/">|<base href="/${{ env.BASE_HREF }}/">|g' build/web/index.html

- 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
remote_path: wonderous.app/$REMOTE_DIR
sftp_only: true
3 changes: 0 additions & 3 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
- name: Build Flutter web app
run: flutter build web --wasm

- name: Update base href in index.html
run: sed -i 's|<base href="/">|<base href="/web/">|g' build/web/index.html

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 81a9aa7

Please sign in to comment.