# Deploying Gatsby to Gatsby Cloud

> Source: https://agilitycms.com/docs/gatsby/deploying-gatsby-to-gatsby-cloud

The easiest way to deploy a Gatsby website to production is to use [Gatsby Cloud](https://www.gatsbyjs.com/products/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.

> You will need a GitHub account to get your project deployed.

Head to the [Gatsby](https://www.gatsbyjs.com/dashboard/login/) website and create or log in to your account using GitHub or GitLab.

![](https://cdn.aglty.io/agility-cms-docs/block-editor/gatsbyarticles/Screen-Shot-2020-10-01-at-1.25.17-PM-09292021163858-09302021164704.png)

Once you're in you can add a new site by importing from a Git. Make sure you have a copy of the code for the [Gatsby Blog Starter](https://github.com/agility/agilitycms-gatsby-starter) within your GitHub Repository.

![](https://cdn.aglty.io/agility-cms-docs/block-editor/gatsbyarticles/Screen-Shot-2020-10-01-at-3.07.47-PM-09292021164126-09302021164722.png)

After you select your Git provider, select a Github organization and the repository containing your Gatsby Blog Starter code.

![](https://cdn.aglty.io/agility-cms-docs/block-editor/gatsbyarticles/Screen-Shot-2021-09-29-at-2.42.30-PM-09292021184300-09302021164753.png)

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

![](https://cdn.aglty.io/agility-cms-docs/block-editor/gatsbyarticles/Screen-Shot-2020-10-01-at-3.24.56-PM-09292021180310-09302021164814.png)

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

*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
```

When you're ready, click **Deploy**.

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.

![](https://cdn.aglty.io/agility-cms-docs/block-editor/gatsbyarticles/Screen-Shot-2020-10-01-at-4.34.33-PM-09292021184541-09302021165010.png)
