I have this auto deploy Github workflow setup which will automatically build and deploy my react app to my cPanel server, using SamKirkland/FTP-Deploy-Action. This has worked previously perfectly fine, but has recently stopped working.
on:
push:
branches:
- production
name: ???? Deploy website on push
jobs:
web-deploy:
name: ???? Deploy
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: ???? Get latest code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: ???? Build Project
run: |
pnpm install
pnpm run build
- name: ???? Sync files
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.GIT_CPANEL_REACT_SERVER }}
username: ${{ secrets.GIT_CPANEL_REACT_USER }}
password: ${{ secrets.GIT_CPANEL_REACT_PWD }}
protocol: ${{ secrets.GIT_CPANEL_REACT_PROTOCOL }}
local-dir: ./build/
But it keeps getting timed out, and returning this error:
Failed to connect, are you sure your server works via FTP or FTPS? Users sometimes get this error when the server only supports SFTP.
Error: Timeout (control socket)
at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.5/dist/index.js:5299:33)
at Object.onceWrapper (node:events:633:28)
at Socket.emit (node:events:519:28)
at Socket._onTimeout (node:net:590:8)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
Error: Error: Timeout (control socket)
Contacted namecheap (server provider) and they told me that nothing was wrong on my cPanel server.