- Outlines the workflow for cloning the vanilla-basic template and publishing via GitHub.
- Explains how Azure Static Web Apps automates CI/CD and custom domain configuration.
- Details the DNS steps in GoDaddy to wire up both www and apex records to Azure.
Introduction
In this tutorial, we walk through the process of creating a website using a GoDaddy domain, Azure Static Web Apps, GitHub Actions, and the vanilla-basic template. This combination provides a powerful, scalable, and cost-effective solution for hosting static websites.
Prerequisites
- A GitHub account
- An Azure account
- A GoDaddy account
- Basic knowledge of HTML, CSS, and JavaScript
Step 1: Set Up Your GitHub Repository
- Go to the vanilla-basic template repository.
- Click on "Use this template" to create a new repository based on this template.
- Name your repository and make it public or private as per your preference.
- Clone the repository to your local machine.
Step 2: Modify the Template & Push Your Changes
- Edit the HTML, CSS, and JavaScript files locally to customise the site.
- Commit your changes with clear messages describing the updates.
- Push the changes back to GitHub.
Step 3: Deploy with Azure Static Web Apps
- Sign in to the Azure Portal and create a new Static Web App resource.
- Connect your GitHub repository when prompted.
- Select the branch to deploy and confirm the build output settings (for vanilla-basic, the default settings work).
- Azure provisions hosting and creates a GitHub Actions workflow for continuous deployment.
Step 4: Configure GitHub Actions
Azure Static Web Apps automatically sets up a GitHub Actions workflow. You can find the YAML definition in your repository under .github/workflows. Every push to the configured branch triggers a build and deploy, keeping your live site in sync with the repository.
Step 5: Set Up Your GoDaddy Domain
- Log in to GoDaddy and open the DNS management page for your domain.
- Add a CNAME record:
- Type: CNAME
- Host:
www - Points to: your Azure Static Web App�s default domain
- TTL: 1 hour (or as required)
- Add an A record for the apex domain:
- Type: A
- Host:
@ - Points to: the IP address supplied by Azure Static Web Apps
- TTL: 1 hour (or as required)
Step 6: Configure Custom Domain in Azure
- Open the Static Web App in the Azure Portal.
- Select Custom domains and click Add.
- Enter your domain (for example,
www.yourdomain.com) and follow the validation prompts. - Repeat for the apex domain if desired.
Conclusion
With GitHub for source control, Azure Static Web Apps for serverless hosting, and GoDaddy for DNS, you now have a modern, automated pipeline for your static website. Any new commit to the main branch will rebuild and redeploy the site automatically.