diff --git a/.github/workflows/build_and _deploy_web_production.yml b/.github/workflows/build_and _deploy_web_production.yml new file mode 100644 index 00000000..f6b26ec5 --- /dev/null +++ b/.github/workflows/build_and _deploy_web_production.yml @@ -0,0 +1,35 @@ +name: Build and Deploy to Production + +on: + workflow_dispatch: + +env: + BASE_HREF: "web" + REMOTE_DIR: "wonderous.app" +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|||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: ${{ env.REMOTE_DIR }}/web + sftp_only: true