In this section, we'll cover:
In this section, we'll cover:
Overview
Stackbit allows you to easily access the services connected to your site such as Netlify for deployment, GitHub for source control or Contentful for the CMS. These can be accessed via the project settings.
Click on the gear icon labeled settings in the upper-right-hand corner of the Stackbit Studio.
This will open the project settings panel where you can see and access your connected services like Contentful, Sanity, Netlify and GitHub.
Deployment Options
By default, sites created with Stackbit will be deployed on Netlify. However, we also offer the possibility of deploying your sites in other platforms:
Azure
Stackbit users now have the option to deploy their Jamstack sites to Microsoft Azure. We have partnered with Microsoft to leverage their Static Web Apps service, so those with Azure accounts can easily integrate and deploy their sites seamlessly.
If you want to deploy your new site to Azure but don’t have an account yet, sign up for one before proceeding.
There are two different paths available to users wishing to deploy to Azure: Add your Azure Active Directory Tenant ID to your Stackbit account. Use Stackbit’s Azure Marketplace app to create a new Azure Managed Resource Group. You’ll enter your Tenant ID and Managed Resource Group on Stackbit when creating your site.
Both paths will allow Stackbit to manage resources on your Azure account, and we will explain the difference between them in this document.
Add your Azure Tenant ID to your Stackbit account
Azure provides a way to authenticate into a user’s account and allow external services to manage and create new resources. Stackbit uses this approach with GitHub’s service, for example. Our platform can create new GitHub repositories on your behalf in your account and connect them to your private repositories. Another example is Netlify, where once you claim your account when building sites via Stackbit, the platform can automatically manage the services that deploy your site on their platform.
On Azure, this is called your Active Directory Tenant ID, (AD Tenant ID).
That is the preferred method of authentication if you are working on your own, as a part of a small team, or do not have an organizational resource management policy to follow. It will allow Stackbit to create new Resource Groups for Static Web Apps on Azure on your behalf. You don’t have to worry about overprovisioning. We abide by the policy limits of Azure, the same way that we do for services like Contentful. We will alert you when you are at capacity and prevent you from creating more sites than your Azure plan allows.
Find your Tenant ID
To find the Azure AD Tenant ID for your account, log into Azure https://portal.azure.com/#allservices.
From here, select the Azure Active Directory, which has a little blue pyramid icon (second row, second from the left). That will drop you into your Default Directory Overview
Under the “Tenant information” card, you will find your Tenant ID. Click on the blue copy icon to copy this ID to your clipboard.
Create a new site on Stackbit
Now, create a new site on Stackbit using the following link:
https://app.stackbit.com/create?deployment=azure
Once on the Stackbit Site Builder page, select your theme, static site generator, and headless CMS as you usually would. In the Azure card, paste the Tenant ID you found in the previous steps and hit ‘Connect.’
That will bring you to an authentication page from Microsoft. Accept the terms, and it will redirect you back to the Site Builder.
For the last step, hit the ‘Create Site’ button, and in a few moments, your site will be ready to edit in the Studio and deployed on Azure. Under the hood, Stackbit will provision the needed Static Web Apps Resource Group and configure it to deploy your new Jamstack site.
When you publish your site or page in Stackbit Studio, it will deploy it on Azure in your newly -created resource group.
Stackbit will store this Tenant ID, which means the next time you create a site using https://app.stackbit.com/create?deployment=azure you will not need to add it, and the platform can simply deploy the new resources automatically.
Use the Stackbit Azure Marketplace app to create a new Azure Managed Resource Group and supply that when creating your site.
Azure provides a way to authenticate into a specific Resource Group generated by a user. This route allows external services to connect and trigger actions inside the resource but not create or manage other resources.
That is the preferred method for developers who want more control over their resource usage, enterprise customers with organizational resource management policies, and agencies managing multiple applications across multiple Azure accounts.
The Stackbit Azure Marketplace App
To make it easy to create a new Azure Managed Resource Group for Static Web Apps, we have created the Stackbit Azure Marketplace App. Users can find this by searching for ‘Stackbit’ in the Azure Marketplace, which can be found through their portal site. You can also get to the app directly by clicking here
After pressing “Create,” you need to select or create a resource group and define the application name,
then agree to the terms and press “Create.”
After the application is ready, go to the resource to check it out.
On the created Managed Application page you can find information about the Stackbit application. In the Resource group, a single static index.html placeholder page was deployed. It contains some useful information about Stackbit. At the top of the page, you will find your Managed Resource Group ID. You’ll need it for the next step.
Visit the Stackbit Site Builder to create a new site.
After selecting your theme, static site generator, and headless CMS, you will need to paste your Tenant ID and Managed Resource Group ID into the Azure card. The Tenant ID is needed to verify that the user has access to the relevant resource group.
When you hit “Create Site,” it will deploy your new site to your specified Manages Resource Group.
When you publish your content changes in Stackbit Studio, it will deploy on your Azure website. Congratulations!
If you run into issues or unexpected behavior, please let us know and we’ll be happy to help.
Digital Ocean
Stackbit users are able to deploy their Jamstack site to multiple platforms, including DigitalOcean. Stackbit’s partnership with DigitalOcean allows users to use DigitalOcean’s App Platform for deploying their static sites using their DigitalOcean accounts.
Pre-requisites
To deploy a Jamstack site created with Stackbit to DigitalOcean, you will need:
- A Stackbit account connected to GitHub. You can create one for free here if you don’t have one.
- A DigitalOcean account. You can sign up here if you don’t have one. You will also need to install the Digital Ocean GitHub application DigitalOcean Github Application.
Step 1: Create a site with Stackbit
To create a site with Stackbit and deploy it to DigitalOcean you need to first log into your Stackbit account, create a new project, and change the deployment option to DigitalOcean.
Step 2: DigitalOcean authorization
Click the ‘Connect’ button.
You will be redirected to the DigitalOcean Authorization page where you’ll be prompted to allow Stackbit to access your DigitialOcean account.
Step 3: Install DigitalOcean’s GitHub app
After connecting your DigitalOcean account with Stackbit, make sure you have the DigitalOcean’s Github Application installed.
You can install it by clicking the “Install” button or just go here.
Then you will be redirected to a GitHub page to accept the installation.
Step 4: Finish creating your site
Once you’ve installed DigitalOcean’s Github Application, you will be redirected to the DigitalOcean page. Return to the Stackbit Summary Page and click the “Create Site” button.
In approximately 60 seconds, you will have your site deployed to DigitalOcean and enabled with Stackbit Studio’s capabilities to manage your site.
Caveats
- Make sure sure you have connected your Stackbit account to GitHub by installing Stackbit’s Github Application. It’s easy to detect if you don’t have it installed; Stackbit will ask you via the interface.
Note: In order to avoid mismatches in permissions on GitHub and deploy your site successfully, make sure you have installed both the DigitalOcean and the Stackbit GitHub applications.
- Right now we support only Git CMS as an option. We are aiming to add support for additional CMS options soon.
Enjoy!
API Keys
This panel also displays your API key, which is necessary for running the project locally, as well as any current collaborators invited to the project.