Deploy your Thulite Site to Microsoft Azure
Azure is a cloud platform from Microsoft. You can deploy your Thulite site with Microsoft Azure’s Static Web Apps service.
This guide takes you through deploying your Thulite site stored in GitHub using Visual Studio Code. Please see Microsoft guides for using an Azure Pipelines Task for other setups.
Prerequisites
To follow this guide, you will need:
- An Azure account and a subscription key. You can create a free Azure account here.
- Your app code pushed to GitHub.
- The SWA Extension in Visual Studio Code.
How to deploy
-
Open your project in VS Code.
-
Open the Static Web Apps extension, sign in to Azure, and click the + button to create a new Static Web App. You will be prompted to designate which subscription key to use.
-
Follow the wizard started by the extension to give your app a name, choose a framework preset, and designate the app root (usually
/
) and built file location (use/public
). Thulite is not listed in the built-in templates in Azure so you will need to selectcustom
. The wizard will run and will create a GitHub Action in the.github
folder of your repo. (This folder will be automatically created if it does not already exist.)
The GitHub Action will deploy your app (you can see its progress in your repo’s Actions tab on GitHub). When successfully completed, you can view your app at the address shown in the SWA Extension’s progress window by clicking the Browse Website button (this will appear after the GitHub Action has run).
Known Issues
The build fails because an old (no longer supported) Node version and/or Hugo version is used.
Node version
To resolve this, update your projects package.json
file with this snippet:
Hugo version
To resolve this, update your workflow file by providing a value for HUGO_VERSION
in the env
section:
Official Resources
- Deploy a Hugo site to Azure Static Web Apps
- Custom Hugo version
- Microsoft Azure Static Web Apps documentation