Skip to main content
26 February 2024

Pantheon deployments from your GitHub repo only

Pantheon is a great Drupal and WordPress hosting. It has a nice UI for deployments. However, doing deployments from UI can have some issues.

 

Problems we solve:

  1. Only one person on the team can do deployments to Test / Prod environment in Pantheon
  2. Deployments need manual steps so that they can be error-prone
  3. There is no easy way to see what code is currently in Production unless you log in to Pantheon and check it there.

 

The solution to these could be full deployment automation. Here is how you can accomplish it with Github and Github Actions.

 

Github to have two branches. Main and Production. Main is where all development happens. On every merge to this branch, we sync the code to Pantheon’s repo and run automated deployment to the Dev environment.

Main branch syncs to dev environment

 

Once code is ready for testing you can create a pull request to GitHub’s production branch. This is when we pull database/files from production and deploy to Pantheon’s Test environment.

Pull request deployed to Test environment

 

Once we merge to Production branch we do a deployment to Live Pantheon’s environment. 

Merge gets deployed to production

Now you always know what code on Pantheon’s Live environment as it mirrors your Production branch.

 

To implement this idea we will need three GitHub pipelines:

  • Deploy-dev (sync main branch to master in Pantheon and run the release)
  • Pull-request-production (deploy to Test Pantheon env when pull request created)
  • Deploy-production (deploy to Pantheon 

 

GitHub actions

 

Introduce Diffy visual regression testing

Once you deploy to the Test environment, you can run visual regression testing automatically, and your results are posted back to the pull request.

For this, you need to specify the Github repo in your project settings

DIffy settings GitHub repo

 

Install Diffy’s check to your GitHub repo.

 

Modify your pull-request-production pipeline.

As a result, you get the following check in your GitHub pull requests

Pull request check

The Complete Compatibility Testing Guide | Tools, Types & Examples

As technology advances faster than ever, software development needs aren't focused on a single platform anymore. Today, each software is developed with the aim to run cross-platform. This is where the need for compatibility testing comes into play.

For the vast majority of software types, you have to test your website’s/application’s compatibility to run on a wide range of devices. How do you do that? How can you make sure that your users can move seamlessly across devices without their experience being hampered in any way?

5 min read

A Comprehensive Guide to Non Functional Testing: Types, Examples, and Tools

Testing is an essential part of the software development lifecycle. Any software application needs to be tested for its functional and non functional requirements. Testing helps to examine if the software application matches all requirements and standards, ensuring customer satisfaction. Various aspects of applications are checked using different tests, classified into functional and non functional testing categories.

17 min read

What Kind of Things Break During WordPress or Drupal Updates and How to Fix Them Quickly

Much of the modern Web is powered by open source content management systems (CMS) like WordPress or Drupal. Like all software, though, even the most reliable CMS needs bugfixes, and all world-class software gets new features in time. And sometimes, – we’ve all been there – no matter how good the intentions behind them are, some updates break things.
3 mins read read

Diffy helps your QA team

to ensure that websites don't get visual bugs