# How to create a staging version of your site

> Learn how to create a staging version of your site with Netlify deploy previews, by pushing a branch and opening a GitHub pull request to get a separate URL.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-05-23 | Topics: [Web Platform](https://flaviocopes.com/tags/platform/) | Canonical: https://flaviocopes.com/website-staging-version/

I was in the process of launching a course, and I needed to finalize the landing page that would be up on the "launch day", without however changing the current version of the site I had up for the public.

I am using [Netlify](https://flaviocopes.com/netlify/) which makes it easy to automatically deploy the website from a Git branch, in my case hosted on [GitHub](https://flaviocopes.com/github/). I will document this process. Other hosting providers that base their CI/CD on a [Git](https://flaviocopes.com/git/) repository might have a similar tool in place.

Every deploy preview and pipeline run has a cost — I built a free [CI cost calculator](https://flaviocopes.com/tools/ci-cost/) if you want to estimate your GitHub Actions minutes.

Netlify automatically builds deploy previews for [Pull Requests](https://flaviocopes.com/how-to-make-first-github-pull-request/). 

So what I did is, I created a new branch, which I called `launch`, and started working on it by adding a few commits, then I created a Pull Request, something that GitHub Desktop makes very easy:

![GitHub Desktop Branch menu with Create Pull Request option highlighted](https://flaviocopes.com/images/website-staging-version/Screen_Shot_2020-05-21_at_16.32.25.png)

Immediately after I sent the PR in, Netlify started its Continuous Integration / Continuous Delivery pipeline:

![GitHub Pull Request page showing Netlify CI/CD pipeline with deployment checks in progress](https://flaviocopes.com/images/website-staging-version/Screen_Shot_2020-05-21_at_16.33.39-redacted.png)

And switching to the Netlify website, I can see it automatically picked up the Pull Request branch, and started a deploy preview:

![Netlify dashboard Deploys section showing deploy preview creation for Pull Request](https://flaviocopes.com/images/website-staging-version/Screen_Shot_2020-05-21_at_16.36.11-redacted.png)

After a few minutes, I got a new URL for the website and I used that to go on with the course launch preparation, while the main domain still pointed to the `master` branch code.
