After you have created a new site on your server, it is time to get your code deployed. WarpSpeed offers several ways to deploy your code. Here are the supported deployment methods:
Push and pull deploy assume you are using git for source versioning. If you aren’t, you should strongly consider it. Please see the details about each method below.
Push deploy utilizes git to push your code from your local development environment to your WarpSpeed server by issuing a simple “git push” command. Push deploy is great for individual developers or for teams where there is one person responsible for deploying code.
To enable push deploy for your site, perform the following steps:
To configure actions that happen each time your code is deployed, you may create a “warpspeed.sh” file in your project’s root directory. See the “Post Deploy Actions” section below for details.
Pull deploy utilizes git for code deployment. Pull deploys can be initiated by clicking a button in the WarpSpeed.io interface or by accessing a special site URL. The special URL can also be placed in a post-commit hook in your repository to auto-deploy each time code is pushed or it can even be added to your continuous integration tool. Pull deploys are great for teams where you have existing deployment or test tools that you need to integrate with.
When a pull deploy is initiated, WarpSpeed will SSH into your server and issue a “git pull” for the specified site. This requires your server to be able to access your git repository. In order to provide access, you must add you server’s public key to your git account.
To enable pull deploy for your site, perform the following steps:
If you would like to run a set of commands each time your code is deployed (via push or pull), you may do so by creating a “warpspeed.sh” file in your project’s root directory. If the file exists, it will be run after successful deployment.
Some useful things to place in your post deploy actions file are:
Make sure to set the appropriate environment settings within your “warpspeed.sh” file to ensure the script will work as you expect. The script will be executed within the root directory of your site.
If you don’t use git for version control, you can also deploy your code via SFTP.