Build and Stage #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Stage | |
| on: | |
| workflow_dispatch: | |
| env: | |
| BASE_HREF: "web" | |
| REMOTE_DIR: "staging.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|<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: ${{ env.REMOTE_DIR }}/web | |
| sftp_only: true |