Gatsby Cloud is a performant platform for building your Gatsby site. Even better, it integrates with Content Delivery Networks (CDNs) like Firebase so you can build and deploy your site seamlessly.
You can set up Gatsby Cloud to autoprovision a new Gatsby site. Alternatively, you can add an existing site to Gatsby Cloud by selecting that GitHub repository during set up.
Once your site is available inside Gatsby Cloud you can “view details” and navigate to the “Site Settings” tab.
Inside Site Settings there is an “Integrations” link. Select this menu item and scroll down to the section titled “Hosting Integrations”.
This is where you’ll see the Firebase logo. Click the “Connect” button to the right of that logo and you’ll be prompted to login into your Firebase account. If you don’t have one, you can create one at this time.
Once you’re authenticated with Firebase you’ll be prompted to authorize Gatsby Cloud to interact with Firebase on your behalf. After you’ve completed this step, you’re ready to configure deployment in Gatsby Cloud.
If you don’t already have one, create a Firebase project in your Firebase console.
On the “Firebase Integration” screen choose a Firebase project for deployment from the dropdown.
Note that you can enter a Firebase site name for projects with multiple sites.
And that’s it! Your site is now set up to build and deploy. Gatsby Cloud will handle everything for you. However, if you want to make a change to your domain you’ll want to do that directly on the Firebase dashboard.
Note that you can only have one hosting integration. If you choose to configure another provider, that will override your existing Firebase integration.