FTP, SFTP, and FTPS Deployment

Codenvy users can integrate with the free service, DeployHQ, provided by aTech Media. If DeployHQ is mapped to your Codenvy git clone, then there is a mechanism where you can instruct DeployHQ to pick up any changes to the repository and push them to the FTP location. If DeployHQ is mapped to a git repository hosted at BitBucket or GitHub, and your Codenvy repository is a clone of that remote, then DeployHQ has “WebHooks” which will monitor the remote repository for any changes, detect them, and automatically push them to your FTP server. When your git repository has updates, DeployHQ will grab the changes, make a secure connection to your FTP server, and copy the updated files directly onto your FTP server. DeployHQ can directly connect with some Codenvy projects if your project has a locally initialized git repository. We will show you how to find the URL for this git repository in the instructions below. For more information about DeployHQ, visit their Web page, and check out a Codenvy guide below:

Register With DeployHQ

Set up a DeployHQ free account using this link.

Connect a Codenvy Project to an FTP/SFTP/FTPS Server Using a Local git Repository

Connect DeployHQ to the Git Repository

Inside of DeployHQ, create a new project:

  • Enter a name for the project
  • Choose the SCM system (currently Codenvy supports Git only)
  • Enter a URL of the source git repository into DeployHQ. Inside of Codenvy, you can find the URL of your local clone at Git > Git URL (Read-Only)
  • git_url

  • The image below shows an example of pasting the Codenvy git URL into DeployHQ


Connect DeployHQ to Your FTP Server

Now that DeployHQ knows where to look for your project, you add an FTP server to deploy the files to. In this example, we have connected to a GoDaddy FTP server:


Trigger DeployHQ Manually to Push Changes

In DeployHQ, there is a button labeled “Deploy”. Pressing this button will force a manual detection of changes by DeployHQ against your repository. DeployHQ has no way of automatically detecting changes to a Codenvy git repository at this time.

Connecting a Codenvy Project to an FTP/SFTP/FTPS Server Using a Remote Git Repository

Host Your Project on a Remote Git Repository

If your git repository is hosted on a service such as GitHub, BitBucket, or Codebase there is a way to map your Codenvy project with DeployHQ to these systems. Inside of Codenvy, your project will be a remote clone of the hosted system. And within your service provider, there are ways to set up a “WebHook” that will notify DeployHQ any time Codenvy pushes committed changes back to your remote repository.

Clone Your Project into Codenvy

Have your Codenvy project act as a git clone to your remote origin repository. Check out Git docs for more details.

Configure Repository and FTP Server Details

Repeat the same steps from above within DeployHQ: create a new project, add the remote git repository URL, and connect to FTP. Note here, that DeployHQ must point to the remote git repository hosted at your provider. Do not reference the local clone git URL.

Add a Webhook – GitHub Example

You can configure your remote provider to notify DeployHQ when your repository is updated. DeployHQ will automatically perform a new deploy with any pushed changes.

First, copy the URL of a DeployHQ hook:

Then, add this URL to GitHub webhooks. Go to your repository, Settings > Service Hooks > Webhook URLs:

Video Tutorial