Skip to content

Build and Stage

Build and Stage #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
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
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/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local_path: ./build/web/*
remote_path: wonderous.app/$REMOTE_DIR
sftp_only: true