Netlify Deploy Previews

Posted in Development and Serverless

I’ve become a bit of an unashamed fan of Netlify recently. I’ve been enjoying taking baby steps with the functionality they offer, and something I’ve been making a quite a bit of use of are their Deploy Previews.

A Deploy Preview is a fully generated clone of your website, but on a pretty obscure URL. This is my most recent preview: https://deploy-preview-167–

They’re generated automatically every time a Pull Request is raised with the intent to merge to master (assuming your master branch is the one you deploy from; use whichever branch triggers your website’s deployment). Netlify runs a handful of tests inside GitHub/GitLab/Bitbucket to ensure everything looks good to deploy, and a Deploy Preview is part of that.

It’s a great way to double check everything is in order before you hit the ‘Merge’ button:

  • If you’re working on a personal project, it gives you some peace of mind that you haven’t done anything that will break in a live environment
  • If you’re working in a team it allows anyone you’ve added to approve your PR to have a poke around or run any visual tests on the URL
  • If you’re working on a small-scale client site and a staging branch/URL is overkill, it could be a good way to get approval before publishing

They also make a nice archive, so you can go back through your closed release PRs/MRs in GitHub/GitLab/Bitbucket and see what the website you’re working on looked like at those points in time. You could also do this by checking out the release commits with Git, but it’s nice to be able to open all the versions in separate browser tabs and have a flick through.

Anyway, Deploy Previews are a handy feature and another reason I’m falling in love with Netlify.

Follow along

If you enjoyed this post and want to know when the next one is published, head to Twitter and hit ‘Follow’.


More posts

Here are a couple more posts for you to enjoy. If that's not enough, have a look at the full list.

  1. Why I always raise a pull request on solo projects

    The whole point of a PR is to get feedback and approval on a piece of work from someone else before it’s published. But what if it’s just you?

  2. De-prioritising design

    When a friend asked for some CSS tips for a website he works on, I noticed a design issue that actually highlights a common problem in our industry.