Goal

Set up Doxygen-based documentation that:

High Level Design

Steps to create a Doxygen Documentation

Step 1: Generate a default Doxyfile (in main)

Ensure Doxygen is installed:sudo apt update sudo apt install doxygen

Generate the default configuration: doxygen -g. This creates a Doxyfile in the root of the project.

Step 2: Configure key Doxyfile settings

Edit Doxyfile and set the core options:

PROJECT_NAME           = "Project Name"
OUTPUT_DIRECTORY       = docs
RECURSIVE              = YES
INPUT                  = Src Inc README.md
FILE_PATTERNS          = *.c *.h
EXTRACT_ALL            = YES
GENERATE_LATEX         = NO

Step 3: Ignore generated documentation

Add to .gitignore: /docs

This ensures:

Step 4: Generate documentation locally

Run: doxygen Doxyfile. verify output: docs/html/index.html

Step 5: Create the gh-pages branch

git checkout --orphan gh-pages      # Create an empty branch with no parent commit
git reset --hard                    # Remove all files from working dir
git commit --allow-empty -m "Initialize gh-pages"  # Create the branch in history
git push origin gh-pages            # Push it to GitHub

Auto-generate and Deploy Documentation (CI)

Goal

Automatically generate and deploy project documentation using GitHub Actions whenever changes are pushed to the main branch.