Skip to content

Commit ecdc8fc

Browse files
committed
Trying to fix the Connection error
1 parent c74b66c commit ecdc8fc

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ concurrency:
1212
jobs:
1313
build-and-deploy:
1414
runs-on: ubuntu-latest
15+
1516
steps:
1617
- name: Checkout code
1718
uses: actions/checkout@v4
@@ -27,16 +28,29 @@ jobs:
2728
npm ci
2829
npm run build
2930
30-
- name: Deploy via FTPS (implicit, strict)
31+
# --- Optional but recommended: prove strict TLS works on control+data before upload
32+
- name: FTPS strict preflight (explicit/21, TLS1.2)
33+
run: |
34+
sudo apt-get update -y && sudo apt-get install -y lftp
35+
lftp -e "set net:timeout 20; set net:max-retries 1; \
36+
set ftp:ssl-allow yes; set ftp:ssl-force yes; \
37+
set ssl:verify-certificate yes; \
38+
set ssl:priority 'NORMAL:-VERS-TLS1.3'; \
39+
cd ${{ secrets.FTP_SERVER_DIR }}; pwd; \
40+
mkdir __gh_tls_strict__; rmdir __gh_tls_strict__; quit" \
41+
-u '${{ secrets.FTP_USER }}','${{ secrets.FTP_PASS }}' \
42+
-p 21 ftps://${{ secrets.FTP_HOST }}
43+
44+
- name: Deploy via FTPS (explicit, strict)
3145
uses: SamKirkland/[email protected]
3246
with:
33-
server: ${{ secrets.FTP_HOST }}
47+
server: ${{ secrets.FTP_HOST }} # MUST be a hostname (CN/SAN must match)
3448
username: ${{ secrets.FTP_USER }}
3549
password: ${{ secrets.FTP_PASS }}
36-
protocol: ftps-legacy
37-
port: 990
50+
protocol: ftps # explicit FTPS
51+
port: 21
3852
security: strict
39-
local-dir: ./build/
40-
server-dir: ${{ secrets.FTP_SERVER_DIR }}
53+
local-dir: ./build/ # trailing slash required
54+
server-dir: ${{ secrets.FTP_SERVER_DIR }}# trailing slash required
4155
log-level: verbose
4256
timeout: 120000

0 commit comments

Comments
 (0)