Skip to content

Commit 821ae52

Browse files
committed
add deploy action
1 parent 81a9aa7 commit 821ae52

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and Deploy (Live!)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
BASE_HREF: "web"
8+
REMOTE_DIR: "web"
9+
jobs:
10+
build:
11+
uses: ./.github/workflows/build_web.yml
12+
13+
deploy:
14+
needs: build
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Download build artifact
19+
uses: actions/download-artifact@v4
20+
with:
21+
name: web-build
22+
path: build/web
23+
24+
- name: Update base href in index.html
25+
run: sed -i 's|<base href="/">|<base href="/${{ env.BASE_HREF }}/">|g' build/web/index.html
26+
27+
- name: Upload to SFTP
28+
uses: wlixcc/[email protected]
29+
with:
30+
server: ${{ secrets.FTP_SERVER }}
31+
username: ${{ secrets.FTP_USERNAME }}
32+
password: ${{ secrets.FTP_PASSWORD }}
33+
local_path: ./build/web/*
34+
remote_path: wonderous.app/$REMOTE_DIR
35+
sftp_only: true

0 commit comments

Comments
 (0)