Semaphore has LFTP, an FTP/HTTP client and a file transfer program, installed by default. LFTP can be used with the Generic Deployment method on Semaphore.
Configuring FTP deployment
The first step is to create 2 environment variables that will allow LFTP to
access your server. Visit the project settings environment variables tab and
create 2 new environment variables,
FTP_PASSWORD. Feel free to
Next, go to the dashboard and press “Set Up Deployment” button for that project.
Choose the Generic Deployment method.
The next step is choosing your deployment strategy. Semaphore supports two deployment strategies, Automatic and Manual. You can read more about them here.
If you choose the automatic deployment strategy, you need to select the branch that will be automatically deployed.
After that, you need to set the commands that will perform the deploy. With LFTP, you can deploy your application using a single line:
lftp -c "open -u $FTP_USER,$FTP_PASSWORD YOUR_FTP_HOST; set ssl:verify-certificate no; mirror -R ./ YOUR_REMOTE_PATH"
Copy the line and paste it in the deploy commands text area.
$FTP_PASSWORD are environment variables that we
YOUR_REMOTE_PATH with corresponding values.
Next, set a meaningful name for the new deployment target.
After that, FTP deployment is fully configured. You can trigger the first deploy manually right from the new server page.