Create a Gatsby Website and Deploy It with ZEIT Now

Create a simple Gatsby website and deploy it live with ZEIT Now.

Gatsby is a popular front-end framework that helps you create static apps and websites with React.

Step 1: Set Up Your Gatsby Project

Firstly, set up a Gatsby project by installing Gatsby CLI globally from your terminal:

npm i -g gatsby-cli

Installing gatsby-cli globally with npm.

Then you can run the following command to create a Gatsby project locally:

gatsby new my-gatsby-project

Creating a Gatsby project with the Gatsby CLI.

Next, move into the directory from your terminal with cd my-gatsby-project. You can see your new project in a local development environment by using the npm develop command, set in the package.json by Gatsby CLI.

Step 2: Deploying Your Gatsby Website with ZEIT Now

With a Gatsby app set up, it is ready to deploy live with Now.

Now allows you to deploy your project from the terminal with a single command using Now CLI:

now

Deploying your Gatsby website with Now CLI.

If you want to deploy your Gatsby project when you push to a Git repository, you can use either Now for GitHub, Now for GitLab, or Now for Bitbucket to have your project automatically deployed on every push, and the production domain updated on push to master.



Written By
Written by timothytimothy
on January 31st 2019