A lot of our customers take advantage of our free test sites, where they can show their clients changes they’ve been working on, once the client approves the changes, they need to push those changes from the test site to the live site. This post will show you and them, how they can automate the process where files will go from Github to WordPress intelligently. Once this is setup, you’ll never have to manually remember what files changed, or push entire folders just to be sure.
Before I continue, I’m going to assume the following.
- You have git configured and working locally
- You have a two distinct test and production environments
- You know how to push changes to your github repo
- You know how to make branches in Git
- You know how to merge pull requests with Github
Dog Fooding - A note about how this applies to us.
This is the workflow we use to push changes of our code from Github to WordPress. It makes it easy for non developers to test and vet out changes we’ve made to our presentation layer. This is not how we push content changes from test to production. That’s called content deployment, and there’s a very good plugin for that already.
1. Local Development - At first, changes are made locally on the developers machine, once the developer is happy with changes, he pushes to the “Staging” branch at github.
2. Deploy HQ – Deploy HQ deploys the code in the appropriate location.
3. UAT – The website owner, or customer looks at the website, is happy, and signs off on the work.
4. Pull Request – A Pull request is made on Github, and merged in with master. Deploy HQ deploys to the production site.
Configuring the test server at DeployHQ.
Configure GitHub to make a web hook call after a push
Please note, this process is independent of any hosting company. This will work whether you host with us, or elsewhere.Continue Reading