I am encountering a timeout error while attempting to deploy a website using FTP in a GitHub Actions workflow. The workflow is triggered on a push event to the main branch and should upload the built files to an FTP server. However, the deployment step fails with the following error message:
Timeout (control socket)
Error: Error: Timeout (control socket)
I am using the SamKirkland/[email protected] action in my workflow YAML file. Here is a simplified version of the relevant section:
name: Deploy website on push
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# ... other steps ...
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: ftp.example.com
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
local-dir: ./build/
server-dir: /
I have verified that the FTP server credentials are correct and that the network connectivity is stable. Manually connecting to the FTP server using a different FTP client works without any issues.
How can I troubleshoot and resolve this timeout error in my GitHub Actions workflow? Are there any specific configurations or settings I should consider? Any help would be appreciated.
I had the same issue, and it is resolved with timeout
under the with
section:
Important note: timeout is in milliseconds
Here is my complete yml file and my timeout is 190 seconds:
name: 🚀 Deploy bot on push
on:
push:
branches:
- deploy
jobs:
build-and-deploy:
name: 🎉 Build and Deploy Website
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: 📂 Sync files via FTP
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.CPANEL_URL }}
username: ${{ secrets.CPANEL_USERNAME }}
password: ${{ secrets.CPANEL_PASS }}
local-dir: server/
server-dir: /public_html/
timeout: 190000