⚠️ This lesson is retired and might contain outdated information.

Deploy a Gatsby Site with Netlify

Taylor Bell
InstructorTaylor Bell
Share this video with your friends

Social Share Links

Send Tweet

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

Instructor: [00:00] 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.

[00:14] 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.

[00:33] 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.

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