Deploying to Azure with Blob Storage
This deployment example refers to Azure with Blob Storage.
Before you get started, you need to have:
In your Custom Application config, make sure to provide the Custom Application ID that you got when you configured the Custom Application in the Merchant Center.
Moreover, you need to provide the production URL from your Azure project. You can keep the standard Azure Blob Storage Static Website URL
https://<project>.z13.web.core.windows.net/ or provide your custom domain.
Using environment variables
In case you want to avoid hardcoding certain values, for example the Application ID, or the Project key, you can use variable placeholders in your Custom Application config.
Connect Azure Blob Storage with GitHub Actions
One of the ways to deploy to Azure is to use Blob Storage. This service allows hosting a static website, but this needs to be enabled and configured in the storage account.
Follow the steps in the Azure Storage Account creator to create a new storage account.
Configuring static website hosting
Once the storage account is created, go to
Static website section of the storage account and provide the following settings:
- Static website:
- Index document name:
- Error document path:
Generating deployment credentials
Follow the Azure instruction to generate deployment credentials. This step will result with the following JSON object as output in the command-line:
Configuring GitHub Action workflow
In your repository configure the GitHub secret named
AZURE_CREDENTIALS and paste the whole JSON object from the previous step as the secret value.
As the next step, add a GitHub Action workflow. For the basic GitHub Action workflow you might want to use the following content in the
yaml file or change it according to your needs:
If your Custom Application config requires environment variables, make sure to provide them in the GitHub Action workflow file. You can define the environment variables either as plain text or using GitHub encrypted secrets.
See example below for defining environment variables for the GitHub action::
Test your deployment
In the Merchant Center you can now follow the steps to install the Custom Application and access it in your Projects.