Preparing a conceptual model for workflow using git branching

In this part, I’m going to explore the mental model for a deployment workflow by mapping it to git branches. Requirements Servers You’ll need at least one proper server. By proper, I mean a server where you can log in from the terminal and run commands. That requires ssh access. I find DigitalOcean¬†(referral link) to […]

Setting up servers & repositories

In the last part, we created a client side workflow with separate stages mapped to specific branches: Git Branch Workflow Stage Server master 1. Development staging 2. Staging production 3. Live/ Production It doesn’t matter how many stages you have in your workflow as long as each stage is mapped to a […]

Digging into git commands for deployment

In the first part of this tutorial, we discussed a mental model of deployment stages mapped to git branches. We also discussed conceptually how running a git push origin branch-name¬†to push code to the remote repository can trigger a webhook which we can use to pull code from the repository to a server using git pull origin branch-name. In the second […]

Creating a simple deployment script with PHP

In earlier parts of this tutorial, we discussed the concepts and mental models associated with a deployment process using git. We also set up our servers and remote repositories. In this part, we create a PHP script that will be invoked when the remote git repository requests the Webhook URL. For this example, we’re going […]

Adding Elegance & Security to Deployment

In the last part, we got a deployment strategy working by mapping our workflow to git branches and setting up a script for automatic deployment. At the end of it I mentioned that our script was not elegant since it would run with any push. It wouldn’t matter if code was pushed to the branch […]