How we deploy code to websites.
Our development workflows involve three environments.
- Development — This is where the code is written.
This is locally hosted on the computers that we’re developing on.
2. Staging — usually on the same servers as the live website.
3. Production — the live website.
Our staging environments are set up to be automatic deployments. That means changed files from each new commit are uploaded automatically to the web server.Production environments are setup to be manual deploys. Which means that at the right times — changes that have passed testing are uploaded to the production web servers by someone pressing the manual deploy button within the deployment tool.
We use Git for version control and for collaboration on code.
We use Beanstalkapp to host most of our active repositories. We chose Beanstalkapp over GitHub because Beanstalkapp has the ability to make secure file transfers (SFTP) directly to our web servers based on our commits.
For some smaller or extremely large projects, we use Bitbucket to host the repository and use Deploybot to deploy the code.
Automated deploys mean
- No more manual tracking of files that were changed and more importantly no more manual uploading of the files that were changed leading to much lesser chances of developer error.
- If there’s an issue with the release we can easily rollback the deployment.
- All of our team members are able to deploy code even when they don’t have access to the servers themselves.
- Since it’s so easy — each one of us is continuously deploying code to staging environments — where every change is tested for quality.
- Enormous savings in time saved manually uploading files.
If your team does not deploy automatically — take the time to figure it out. Your team will thank you for letting them focus on developing code not worrying about deploying it.