Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Deploy a Gatsby Site with Netlify


    There are several options for hosting your Gatsby blog. In this lesson, you'll learn how to deploy your site to Netlify.



    Become a Member to view code

    You must be a Pro Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    orLog In




    Instructor: Now that we're done building our blog, we can run gatsby build. While this does its thing, we'll come over to GitHub, and we'll create a new repository. We'll copy our add origin. Inside of our myBlog directory, we have a new public directory.

    We'll go in there, and we can see that these are all of our built files. I'm going to initialize an empty Git repository, and we'll paste our remote add origin, add everything in the directory, do a new commit, do a git push origin master, and then now, we can see our built files have ended up in GitHub.

    Now, over Netlify, I've logged in, and I'm going to use the new site from Git, connect to GitHub here, and find our demo blog. Our branch will be master. We don't have any build commands or publish directories because we've uploaded it into the route, and clicked the deploy button.

    After it's done deploying, we can open it in a new tab, and our blog is live.