With DeployHQ Build, you can set up Build commands, which are commands that you can define to run on our servers before starting a deployment. These commands may fetch dependencies, build assets or anything else you can think of. Any generated files will be uploaded with your deployment.
In order to be able to take advantage of Build Commands in DeployHQ, you'll need to have the addon enabled on your account.
To create a new build command, click the Build Commands link on the left hand side of the page, then the New Build Command button on the right hand side:
Add a description for your build command, then enter any commands that you wish to run below. If you're running multiple commands, just place each command on a new line.
Enable the option Stop deployment if the command failed? if you want to halt the process if an exit code other than
0 is returned, then click Create Build Command to finish.
You can configure a number of additional useful options for your builds as well, which can be found below:
By default, the build command will run during all deployments for your project, but if you wish to override this for a specific deployment, click the Show Advanced Options button below the selected revisions on the deployment page, then enable or disable the Run build commands? option as appropriate.
Some builds may require you to fetch dependencies from an authenticated endpoint, in particular a remote repository. If you need to do so, you'll be able to add your DeployHQ project's public key to the
authorized_keys file on the repository server, or the deployment/access keys list for the repository if it's hosted with one of the major hosting providers such as Codebase or Github.
For further information about adding the key to a repository hosted with one of the main providers, please take a look at this guide on our manual.
Out of the box, DeployHQ build runs on Ubuntu 16.04 servers and supports the following languages and tools:
- PHP 7 and Composer
- NodeJS with npm, Yarn and gulp
- ASP.NET Core 2.0 CLI
- Ruby & Bundler
- Java & Gradle
When running a build, a new, sandboxed container will be spawned in our build servers. You won't have root access, but you can run anything you like that's available from one of the supported tools.
If there is anything missing that you'd like us to add, please get in contact.