How this site is built and deployed

October 2, 2026 · Azure Static Web Apps · GitHub Actions · Cloudflare

This site is plain HTML and CSS with no build step. A push to main in GitHub deploys it to Azure Static Web Apps, and Cloudflare handles DNS for jalin.it. This post walks through the setup, including the deployment error I hit along the way.

The architecture

  • Source: a GitHub repository. The site lives in src/.
  • Deploy: a GitHub Actions workflow, generated by Azure, uploads src/ to a Static Web App on the free tier.
  • DNS: Cloudflare, with records set to DNS only so Azure can validate the domain and issue the TLS certificate.

Creating the Static Web App

In the Azure portal I created a Static Web App, chose GitHub as the deployment source, and selected the repo and the main branch. Azure then committed a workflow file to the repo and stored a deployment token as a GitHub secret. From that point every push triggers a deployment.

The error: “Could not find ‘build’ or ‘build:azure’ node under ‘scripts’”

The first run failed. The site has no package.json, so the message made no sense at first. The cause is in the generated workflow: one step runs npm install to fetch a helper that requests a short-lived identity token. That install creates a package.json at the repo root on the build machine. Azure’s build tool (Oryx) then finds it and expects a build script.

I fixed it in two ways:

  1. Set skip_app_build: true in the deploy step, since there is nothing to build.
  2. Moved the site into src/ and set app_location: "src", so the build tool never looks in the folder where the stray package.json appears.
app_location: "src"
output_location: ""
skip_app_build: true

Custom domain with Cloudflare

For the bare domain, Azure validates ownership with a TXT record. Then a CNAME at the root points the domain at the app’s default hostname. Cloudflare allows this by flattening the CNAME. I also added www as a second custom domain.

Two things tripped me up:

  • The CNAME target must be the app’s full default hostname, including the numeric part. Using the wrong value gave me an unhelpful “unknown error” in Cloudflare.
  • The www record was proxied (orange cloud) and not yet added in Azure, which produced a 404 from Azure. Setting it to DNS only and registering the name in Azure fixed it.
← All projects