Deploying your Gatsby Site to Netlify

Follow

An excellent solution to deploy a Gatsby website to production is to use Netlify. Netlify is a web hosting platform that offers cloud hosting and serverless backends for static websites.

This tutorial will guide you on how to deploy a Gatsby website to Netlify from a Git Repository.

Before you start

Learn how to Set Up your Gatsby Development Environment

Head to the Netlify website and create or log in to your account.

Screen_Shot_2021-01-06_at_2.24.13_PM.png

Once you're logged in you can add a new site by importing from a Git repository.

Screen_Shot_2021-01-06_at_2.26.11_PM.png

Connect to your Git provider.

Screen_Shot_2021-01-06_at_2.41.22_PM.png

Search for and select the Git repository of the website you wish to host.

Screen_Shot_2021-01-06_at_2.46.23_PM.png

Once you've selected your Git repository, fill out your build settings. Be sure to click "Advanced Settings" to include the environment variables needed for your Gatsby production build.

Build Variables:

AGILITY_API_ISPREVIEW = false
AGILITY_API_KEY = LIVE API KEY
AGILITY_GUID = INSTANCE GUID

When you're done, click deploy!

Screen_Shot_2021-01-06_at_3.11.04_PM.png

When your deployment is done, Netlify will provide you with a temporary deployment URL. A custom domain can be added to your site by navigating into the Domain settings.

Screen_Shot_2021-01-06_at_3.26.06_PM.png

 

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.