Deploying your Gatsby site to Gatsby Cloud

Follow

The easiest way to deploy a Gatsby website to production is to use Gatsby Cloud from the Gatsby team. Gatsby Cloud is a platform that gives your Gatsby website superpowers! With intelligent caching and incremental builds, Gatsby Cloud takes the speed and performance of your Gatsby website to another level.

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

Before you start

Learn how to Set Up your Gatsby Development Environment

Head to the Gatsby website and create or log in to your account using GitHub or GitLab.

Screen_Shot_2020-10-01_at_1.25.17_PM.png

Once you're in you can add a new site by importing from a Git repository or starting from a template. I'll be importing from a Git repository.

Screen_Shot_2020-10-01_at_3.07.47_PM.png

After you select your Git provider, select a Github organization and repository.

Screen_Shot_2020-10-01_at_3.17.30_PM.png

Next, you want to make sure you add your Build and Preview variables and hit save.

Screen_Shot_2020-10-01_at_3.24.56_PM.png

You can find the Keys needed for your environment variables in Agility under Settings > API Keys.

Screen_Shot_2021-03-01_at_4.32.59_PM.png

Build Variables:

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

Preview Variables:

AGILITY_API_ISPREVIEW = true
AGILITY_API_KEY = PREVIEW API KEY
AGILITY_GUID = INSTANCE GUID

The next time you make a commit, gatsby will build a production deployment for you! You can also trigger a new build straight from within Gatsby Cloud.

Screen_Shot_2020-10-01_at_4.34.33_PM.png

 

 

 

 

 

 

1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.