CI/CD Pipeline

1. Version Control with Git and GitHub

🎯 Goal

Create a static HTML website and establish version control using Git and GitHub to prepare for automated deployment to Azure with nginx.

📋 Prerequisites

Before beginning this exercise, you should:

  • Have VS Code installed on your local machine
  • Have Git installed and working in your terminal
  • Have created a free GitHub account at github.com
  • Understand basic command line navigation

📚 Learning Objectives

By the end of this exercise, you will:

»

2. CI/CD Pipeline with GitHub Actions

🎯 Goal

Implement automated deployment of your static website to an Azure VM running nginx using GitHub Actions and a self-hosted runner.

📋 Prerequisites

Before beginning this exercise, you should:

  • Have completed Exercise 1 (Git repository with HTML website)
  • Have an active Azure subscription
  • Have Azure CLI installed and configured locally
  • Understand basic Linux commands and SSH

📚 Learning Objectives

By the end of this exercise, you will:

  • Provision an Azure VM with nginx using infrastructure as code
  • Configure a self-hosted GitHub Actions runner on the VM
  • Create a GitHub Actions workflow for automated deployment
  • Implement continuous deployment triggered by git push
  • Understand systemd services for runner management
  • Add health checks and rollback capabilities

🔍 Why This Matters

In real-world applications, CI/CD pipelines are crucial because:

»