In order to launch a new version of your website without disrupting the current live version, you can create a staging version. This tutorial will guide you through the process of deploying a staging version of your website based on a GitHub Pull Request using Netlify.

Introduction

When launching a new course or making significant changes to your website, it’s crucial to have a separate staging environment where you can make and test these changes without affecting the public-facing version of your site. Netlify, a hosting service that integrates with GitHub, provides an easy way to automatically deploy websites from Git branches. This tutorial will demonstrate how to create a staging version of your site using Netlify’s CI/CD pipeline.

Step-by-Step Guide

  1. Create a new branch:

    • Start by creating a new branch in your Git repository. Give it a descriptive name, such as ’launch’, to indicate that this is the branch for your staging version.
    • Use this branch to make the necessary modifications and additions to your website’s landing page.
  2. Commit your changes:

    • Once you have made the desired changes, commit your work to the ’launch’ branch. This will track your progress and store the modifications you have made.
  3. Create a Pull Request:

    • On GitHub, create a Pull Request for the ’launch’ branch. This can easily be done using GitHub Desktop or the command line.
    • This Pull Request will serve as a way to review the changes you have made and merge them into your main codebase.
  4. Wait for Netlify to deploy the preview:

    • After submitting the Pull Request, Netlify will automatically trigger its Continuous Integration / Continuous Delivery pipeline.
    • Netlify will build a deploy preview based on the Pull Request, allowing you to preview the changes made in the ’launch’ branch without affecting the live version of your website.
  5. Access the deploy preview:

    • Switch to the Netlify website and navigate to the deploy preview associated with your Pull Request.
    • Netlify will provide you with a new URL specifically for the staging version of your site.
    • Use this URL to review and prepare for the course launch, while keeping the main domain pointed to the ‘master’ branch code.

That’s it! By following these steps, you can create a staging version of your site using Netlify. This allows you to make and test changes without impacting the live version of your website, ensuring a smooth and seamless launch.

Tags: website staging, GitHub Pull Request, Netlify, continuous integration, continuous delivery