1
1
name : Build and Deploy Docusaurus (Strict FTPS)
2
2
3
3
on :
4
- # Runs when a PR is merged into main (a merge commit is a push to main)
5
4
push :
6
5
branches : [ main ]
7
6
@@ -12,46 +11,33 @@ concurrency:
12
11
jobs :
13
12
build-and-deploy :
14
13
runs-on : ubuntu-latest
15
-
16
14
steps :
17
- - name : Checkout
18
- uses : actions/checkout@v4
15
+ - uses : actions/checkout@v4
19
16
20
- - name : Setup Node
21
- uses : actions/setup-node@v4
17
+ - uses : actions/setup-node@v4
22
18
with :
23
19
node-version : 20
24
- cache : ' npm'
20
+ cache : npm
25
21
26
22
- name : Install & Build
27
23
run : |
28
24
npm ci
29
25
npm run build
30
26
31
- # ----- STRICT FTPS DEPLOY -----
32
- - name : Deploy via FTPS (strict)
27
+ - name : Deploy via FTPS (explicit, strict)
33
28
uses :
SamKirkland/[email protected]
34
29
with :
35
- server : ${{ secrets.FTP_HOST }}
30
+ # IMPORTANT: Use a HOSTNAME here (FQDN), not an IP address
31
+ server : ${{ secrets.FTP_HOST }} # e.g. dd26812.kasserver.com
36
32
username : ${{ secrets.FTP_USER }}
37
33
password : ${{ secrets.FTP_PASS }}
38
34
39
- # Docusaurus output folder; MUST end with a trailing slash
40
- local-dir : ./build/
41
-
42
- # Your web root/subdir on the server; put the trailing slash in the secret itself,
43
- # e.g. "/public_html/docs/" (must be writeable by your FTP user)
44
- server-dir : ${{ secrets.FTP_SERVER_DIR }}
45
-
46
- # Explicit FTPS on port 21 (most hosts). For implicit FTPS use ftps-legacy + port 990.
47
- protocol : ftps
35
+ protocol : ftps # explicit FTPS
48
36
port : 21
37
+ security : strict # keep strict
49
38
50
- # Keep certificate checks strict (reject bad/unknown CAs)
51
- security : strict
39
+ local-dir : ./build/ # must end with /
40
+ server-dir : ${{ secrets.FTP_SERVER_DIR }} # ensure secret ends with /
52
41
53
- # Make logs verbose while you're stabilizing this
54
42
log-level : verbose
55
-
56
- # FTP op timeout (ms). Adjust if your host is slow.
57
43
timeout : 120000
0 commit comments