1
- # FINAL VERSION: .github/workflows/deploy.yml
2
-
3
- name : Build and Deploy Docusaurus Site
1
+ name : Build and Deploy Docusaurus (Strict FTPS)
4
2
5
3
on :
4
+ # Runs when a PR is merged into main (a merge commit is a push to main)
6
5
push :
7
- branches :
8
- - main
6
+ branches : [ main ]
7
+
8
+ concurrency :
9
+ group : docusaurus-deploy
10
+ cancel-in-progress : true
9
11
10
12
jobs :
11
13
build-and-deploy :
12
14
runs-on : ubuntu-latest
15
+
13
16
steps :
14
- - name : Checkout Code
17
+ - name : Checkout
15
18
uses : actions/checkout@v4
16
19
17
- - name : Set up Node.js
20
+ - name : Setup Node
18
21
uses : actions/setup-node@v4
19
22
with :
20
- node-version : ' 18 '
23
+ node-version : 20
21
24
cache : ' npm'
22
25
23
- - name : Install and Build
26
+ - name : Install & Build
24
27
run : |
25
- npm install
28
+ npm ci
26
29
npm run build
27
30
28
- - name : Deploy via FTPS
29
- uses :
SamKirkland/[email protected]
31
+ # ----- STRICT FTPS DEPLOY -----
32
+ - name : Deploy via FTPS (strict)
33
+ uses :
SamKirkland/[email protected]
30
34
with :
31
35
server : ${{ secrets.FTP_HOST }}
32
36
username : ${{ secrets.FTP_USER }}
33
37
password : ${{ secrets.FTP_PASS }}
38
+
39
+ # Docusaurus output folder; MUST end with a trailing slash
34
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)
35
44
server-dir : ${{ secrets.FTP_SERVER_DIR }}
45
+
46
+ # Explicit FTPS on port 21 (most hosts). For implicit FTPS use ftps-legacy + port 990.
36
47
protocol : ftps
37
48
port : 21
49
+
50
+ # Keep certificate checks strict (reject bad/unknown CAs)
38
51
security : strict
39
- timeout : 300000 # <-- ADD THIS LINE: Increase timeout to 90 seconds
52
+
53
+ # Make logs verbose while you're stabilizing this
54
+ log-level : verbose
55
+
56
+ # FTP op timeout (ms). Adjust if your host is slow.
57
+ timeout : 120000
0 commit comments