Project · 7 parts · 2026

Building a CI/CD pipeline on Azure

A series of articles on building a complete CI/CD pipeline on Azure: Docker, Container Registry, Container Apps, GitHub Actions with OIDC and Static Web Apps, each building block validated by hand before being automated.

  • Azure
  • Docker
  • GitHub Actions
  • OIDC
  • Static Web Apps

What this is about

This series documents, as a set of articles, how I built a complete CI/CD pipeline on Azure for West Bali Drivers, a showcase website for a network of drivers in Bali. The website itself (Next.js, static, no backend) is just a pretext: what is documented here is the infrastructure and the automation that deliver it in a reproducible, secure and professional way.

The common thread is deliberately educational and transparent: every building block is first validated by hand (local build, manual push, Azure resources created manually) before being automated in a GitHub Actions pipeline. The choices, the dead ends and the mistakes along the way are documented just as much as the solutions I kept.

I follow DevOps principles today, but I am not a developer: I come from the systems and networks world. So this series naturally speaks to readers familiar with infrastructure rather than to hardcore developers, with a systems analogy for each new building block.

Target architecture

The pipeline is built around three environments, which deliberately rely on three different deployment approaches rather than a single uniform stack.

Spoiler, the whole thing will look like this:

Deployment pipeline diagram (labels in French). On the local machine, code runs in a dev container and is pushed to GitHub. A push to the staging branch runs staging.yml, which builds the image, pushes it to Azure Container Registry and deploys it to Azure Container Apps, protected by Easy Auth. A manual version tag on main runs production.yml, which tags the same image, extracts its static files and deploys them to Azure Static Web Apps. GitHub Actions authenticates with OIDC through Entra ID, and the Container App pulls images with a managed identity.
The whole pipeline: a containerized staging chain, a static production chain, and passwordless identities in between. · enlarge diagram

But don’t run away: it will all make sense as you read on. A diagram that looks complicated, for a principle that is actually fairly simple.

Why this deliberate break between a containerized staging and a production that isn’t? The answer is detailed in part 1. In short: running a container 24/7 to serve static HTML files is an expense the need does not justify, while Azure Static Web Apps does exactly that job for free. The containerized pipeline remains, however, the foundation production will switch to as soon as the application gains a backend.

The workflow at a glance

StepWho handles itWhat happens
DevelopmentMeLocal development with hot reload in a Docker container (docker compose up).
Push to stagingMeA plain git push. I have nothing else to do.
The buildGitHub ActionsDocker image build, pushed to ACR under two tags: staging (moving) and sha-<hash> (immutable, to find any commit again).
StagingContainer AppsA new revision starts with the freshly pushed image. I check the site like a real visitor.
ValidationMe (the only human decision)If all is well: a Git tag vX.Y.Z on the validated commit.
Going to productionGitHub Actionsworkflow_dispatch: the current staging image gets the vX.Y.Z tag, its static files are extracted and shipped to Static Web Apps.
Smoke testGitHub ActionsThe workflow checks that the site responds, otherwise it turns red.
Something wrong?MeSame command, with an older version number. No extra build needed.

A production release, in three lines

bash
git tag -a v0.3.0 origin/staging -m "Site update: new tour"
git push origin v0.3.0
gh workflow run production.yml --ref main -f version=v0.3.0

Dashboard

StagingProduction
URLca-westbalidrivers-staging.<hash>.westeurope.azurecontainerapps.io<random-words>-<hash>.azurestaticapps.net
HostingAzure Container Apps (Nginx container)Azure Static Web Apps (static files)
Triggergit push to stagingManual workflow run, with a version tag
Artifact sourceDocker image buildPromotion of the image validated in staging (no build)
Deployment time~2 min 30~2 min 30
Rollback / roll-forwardn/a~2 min 30 (same workflow as a promotion), with no build at all
Hosting cost~€4 / month (Azure Container Registry)€0 (Static Web Apps, Free plan)

The articles

  1. 01Introducing the project

    Why this project, which tech stack, and above all why the three environments, dev, staging and prod, rely on three radically different deployment approaches.

  2. 02Containerization

    Multi-stage Dockerfile, docker-compose for development with hot reload, Nginx configuration, and full local validation before touching Azure.

  3. 03Azure Container Registry

    Creating a private container registry on Azure, a tagging strategy, and a first manual push of the image to validate the chain end to end before automating it.

  4. 03aInitializing the Git repository and connecting it to GitHub

    Initializing the local repository, checking the .gitignore, creating the remote repository on GitHub, choosing how to authenticate and pushing the first commit.

  5. 04Azure Container Apps

    Deploying the image to a serverless staging with scale-to-zero: managed identity and passwordless AcrPull permission, the Container Apps environment, and a few surprises from the Azure PowerShell tooling.

  6. 04aRestricting access to Container Apps with Entra ID (Easy Auth)

    Putting Entra ID authentication in front of the staging container, so that only accounts from the right tenant can reach it.

  7. 05GitHub Actions for staging

    OIDC identity federation between GitHub and Azure (zero static secrets), then the workflow that builds, pushes to ACR and deploys to Container Apps on every push to staging.

  8. 06Production on Azure Static Web Apps

    Rather than rebuilding the site for prod, we promote the image validated in staging. Static Web App, security headers, Git and ACR version tags, and a first manual release to production.

  9. 07Automating the release to production

    Taking the human out of the mechanical steps, not out of the decision: an OIDC identity dedicated to prod, a custom Azure role, a one-click promotion workflow, and rollback without a rebuild.

  10. 08Custom domain and search enginessoon

    Wiring up the custom domain and opening the site to search engines.

© 2026 Louis Lecat