Skip to main content

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–tempertemper.netlify.com.

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.

Subscribe

If you enjoyed reading this and want a monthly roundup of my articles delivered to your inbox, just enter your email below.

I don’t collect any data on when, where or if people open the emails I send them. Your email will only be used to send you newsletters and will never be passed on. You can unsubscribe at any time.

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. Using Pandoc to convert Markdown to Jira’s Textile in Sublime Text

    It’s a real pain that Jira’s plain text input isn’t Markdown. Here’s how to I write in Markdown and export to Jira’s version of Textile.

  2. Apple dials back the Safari 15 for macOS redesign

    The ultra-condensed tab bar in the up-coming Safari for macOS has been reverted in the betas; it’s now just an option in Safari’s Preferences.