Skip to content

Commit e652b05

Browse files
committed
fixed connection issues in deployment scripts
1 parent b9c1ea9 commit e652b05

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ jobs:
3737
working-directory: ./eunixmac_frontend
3838
run: npm run build
3939

40+
# --- Test SFTP Connection ---
41+
- name: Test SFTP Connection
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y sshpass
45+
echo "Attempting to connect to SFTP server..."
46+
sshpass -p "${{ secrets.SFTP_PASSWORD }}" sftp -o StrictHostKeyChecking=no -P 22 ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }} <<< "ls /home/eunixmac/public_html/eunixmac_backend/"
47+
echo "SFTP connection test finished."
48+
4049
# --- Deploy Files via SFTP ---
4150
- name: Deploy Backend Files
4251
uses: wangyucode/sftp-upload-action@v1.4.9

prompt.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
Current runner version: '2.326.0'
2-
Runner Image Provisioner
3-
Operating System
4-
Runner Image
5-
GITHUB_TOKEN Permissions
6-
Secret source: Actions
7-
Prepare workflow directory
8-
Prepare all required actions
9-
Getting action download info
10-
Error: Unable to resolve action larytet/sftp-action@v1, action not found
1+
/home/runner/work/_actions/wangyucode/sftp-upload-action/v1.4.9/dist/index.js:8430
2+
const newError = new Error(msg);
3+
^
4+
Error: connect: getConnection: Timed out while waiting for handshake
5+
at SftpClient.fmtError (/home/runner/work/_actions/wangyucode/sftp-upload-action/v1.4.9/dist/index.js:8430:22)
6+
at SftpClient.connect (/home/runner/work/_actions/wangyucode/sftp-upload-action/v1.4.9/dist/index.js:8560:37)
7+
at async Deployer.sync (/home/runner/work/_actions/wangyucode/sftp-upload-action/v1.4.9/dist/index.js:32:9) {
8+
code: 'ERR_GENERIC_CLIENT',
9+
custom: true
10+
}
11+
Node.js v20.19.3

0 commit comments

Comments
 (0)