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–

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.

Accessibility in your inbox

I send an accessibility-centric newsletter on the last day of every month, containing:

  • A roundup of the articles I’ve posted
  • A hot pick from my archives
  • Some interesting posts from around the web

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. Images as the first thing in a button or link

    If the text of an interactive element like a button or link is preceded with an accessible image, we’ve probably got an accessibility problem.

  2. Alt text for CSS generated content

    There’s an interesting feature in Safari 17.4 that allows content added with CSS to have ‘alt’ text. I’m not sure how I feel about this.