Documentation Workflow Guide
π Doxygen + GitHub Pages Deployment
The Documentation workflow builds Doxygen documentation and optionally deploys it to GitHub Pages with link checking and artifact management.
π Table of Contents
- Overview
- Inputs
- Outputs
- Usage Examples
- Configuration
- GitHub Pages Setup
- Troubleshooting
- Related Workflows
π― Overview
Purpose: Generate and deploy versioned documentation with Doxygen and Jekyll integration
Key Features:
- Versioned Documentation Architecture: Automatic version detection and deployment
- Doxygen + Graphviz integration (optimized installation)
- Jekyll static site generation with enhanced presentation
- Centralized Doxygen Management: Single source of truth for all API versions
- Smart Root Redirects: Always redirects to latest/development version
- Interactive Version Selector: Beautiful UI for navigating between versions
- Advanced link checking with Lychee
- Markdown linting (markdownlint)
- Spell checking (cspell)
- Modern GitHub Pages deployment using peaceiris/actions-gh-pages
- Concurrency control and artifact storage
- Fast dependency installation using pre-built binaries
Use Case: Automated versioned documentation generation and deployment for C/C++ projects with comprehensive versioning support
ποΈ Versioned Documentation Architecture
The workflow implements a sophisticated versioned documentation system that automatically manages multiple versions of your documentation:
Directory Structure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
gh-pages branch:
βββ .git/
βββ README.md
βββ index.html (redirect to latest/development)
βββ version_selector.html (interactive version browser)
βββ development/ (main branch docs from _site/)
β βββ index.html # From Jekyll _site/
β βββ assets/ # From Jekyll _site/
β βββ docs/ # From Jekyll _site/
β βββ api/ # Copied from doxs/development/ (Jekyll-compatible)
β βββ version_info.json # Created by workflow
βββ v1.0.0/ (stable releases from _site/)
β βββ index.html # From Jekyll _site/
β βββ assets/ # From Jekyll _site/
β βββ docs/ # From Jekyll _site/
β βββ api/ # Copied from doxs/v1.0.0/ (Jekyll-compatible)
β βββ version_info.json # Created by workflow
βββ doxs/ (centralized Doxygen artifacts)
βββ v1.0.0/
βββ development/
βββ latest -> v1.0.0/
βββ version_selector.js
βββ versions.json
Version Detection Strategy
mainbranch βdevelopmentversionrelease/v*branches β versioned releases (e.g.,v1.2.0)v*tags β stable releases (e.g.,v1.2.0)- Other branches β
previewversion
Smart Root Redirects
- Stable releases: Redirects to the specific version
- Development: Redirects to
development - Preview: Redirects to
developmentas fallback
Interactive Version Selector
- Beautiful, responsive UI for version navigation
- Shows version types (Development, Stable Release, Preview)
- Highlights current version
- Mobile-friendly design
Deployment Flow
The deployment process follows this sequence:
- Build Phase:
- Jekyll generates static site in
_site/directory - Doxygen generates API docs in centralized
/doxs/directory - Quality checks run in parallel
- Jekyll generates static site in
- Deploy Phase:
peaceiris/actions-gh-pagesdeploys_site/contents togh-pages/version/peaceiris/actions-gh-pagesdeploysdoxs/contents togh-pages/doxs/- Version metadata created in each deployed directory
- Update Phase:
- Root redirect updated to point to appropriate version
- Version selector updated with all available versions
- README updated with current deployment info
Key Benefits:
- β
Direct Deployment: Generated
_sitedirectory deployed directly to version folder - β Preserved History: All previous versions remain accessible
- β Centralized API: Doxygen docs available at root level for all versions
- β Smart Navigation: Root always redirects to appropriate version
βοΈ Inputs
π Repository Configuration
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
checkout_recursive |
boolean | β | false |
Checkout submodules recursively (for projects with docs in submodules) |
π Doxygen Configuration
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
doxygen_config |
string | β | Doxyfile |
Path to Doxyfile (relative to repo root) |
doxygen_fail_on_warnings |
boolean | β | false |
Treat Doxygen warnings as errors in CI |
π Link Checking
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
run_link_check |
boolean | β | true |
Run documentation link checker |
link_check_paths |
string | β | **/*.md |
Space-separated paths to check for broken links |
link_check_config |
string | β | '' |
Path to lychee.toml config file (optional) |
verbose |
boolean | β | false |
Enable verbose output for link checking |
π Documentation Quality
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
run_markdown_lint |
boolean | β | false |
Run markdown linting on documentation files |
markdown_lint_paths |
string | β | **/*.md |
Space-separated glob patterns for markdown files to lint |
run_spell_check |
boolean | β | false |
Run spell checking on documentation files |
spell_check_paths |
string | β | **/*.md |
Space-separated glob patterns for files to spell check |
spell_check_config |
string | β | .cspell.json |
Path to cspell configuration file |
π Deployment
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
deploy_pages |
boolean | β | true |
Deploy to GitHub Pages |
deployment_branch |
string | β | gh-pages |
Branch name for deployment (required for versioned documentation) |
π¨ Jekyll Configuration
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
jekyll_enabled |
boolean | β | false |
Enable Jekyll static site generation |
jekyll_config |
string | β | _config.yml |
Comma-separated list of Jekyll configuration files |
jekyll_source |
string | β | docs |
Jekyll source directory containing your site files |
jekyll_destination |
string | β | _site |
Jekyll build destination directory for generated site |
jekyll_environment |
string | β | production |
Jekyll environment (development, production, staging) |
βοΈ Jekyll Advanced Options
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
jekyll_safe |
boolean | β | true |
Run in safe mode (disables custom plugins, used by GitHub Pages) |
jekyll_plugins_dir |
string | β | '' |
Comma-separated list of plugin directories |
jekyll_layouts_dir |
string | β | '' |
Layout directory |
jekyll_verbose |
boolean | β | false |
Enable verbose output during Jekyll build |
jekyll_strict_front_matter |
boolean | β | true |
Fail build on YAML syntax errors in front matter |
jekyll_drafts |
boolean | β | false |
Include draft posts in the build |
jekyll_future |
boolean | β | false |
Include future-dated posts in the build |
jekyll_unpublished |
boolean | β | false |
Include unpublished posts in the build |
jekyll_incremental |
boolean | β | false |
Enable incremental builds for faster development |
jekyll_lsi |
boolean | β | false |
Enable LSI (Latent Semantic Indexing) for related posts |
jekyll_limit_posts |
string | β | '' |
Limit the number of posts to parse and publish |
jekyll_profile |
boolean | β | false |
Enable profiling output to show build performance |
jekyll_quiet |
boolean | β | false |
Suppress normal output during Jekyll build |
jekyll_trace |
boolean | β | false |
Show full backtrace when an error occurs |
π€ Outputs
| Output | Description |
|---|---|
| Versioned Documentation | Deployed to gh-pages/version/ directories |
| Centralized API Docs | Doxygen artifacts in gh-pages/doxs/ directory |
| Root Navigation | Smart redirects and version selector |
| Version Metadata | version_info.json files in each deployed directory |
| GitHub Pages | Live documentation site (if enabled) |
| Artifacts | Uploaded documentation files for download |
π Usage Examples
Basic Usage
1
2
3
4
5
6
jobs:
docs:
uses: N3b3x/hf-general-ci-tools/.github/workflows/docs.yml@v1
with:
doxygen_config: Doxyfile
deployment_branch: gh-pages
With Submodule Support
1
2
3
4
5
6
7
jobs:
docs:
uses: N3b3x/hf-general-ci-tools/.github/workflows/docs.yml@v1
with:
doxygen_config: Doxyfile
deployment_branch: gh-pages
checkout_recursive: true # Enable submodule checkout
With Documentation Quality Checks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
jobs:
docs:
uses: N3b3x/hf-general-ci-tools/.github/workflows/docs.yml@v1
with:
doxygen_config: Doxyfile
deployment_branch: gh-pages
run_link_check: true
link_check_paths: "docs/** *.md **/docs/**"
run_markdown_lint: true
markdown_lint_paths: "docs/** *.md"
run_spell_check: true
spell_check_paths: "docs/** *.md"
spell_check_config: ".cspell.json"
deploy_pages: true
With Jekyll Integration
1
2
3
4
5
6
7
8
9
10
11
12
jobs:
docs:
uses: N3b3x/hf-general-ci-tools/.github/workflows/docs.yml@v1
with:
doxygen_config: Doxyfile
deployment_branch: gh-pages
jekyll_enabled: true
jekyll_config: "_config.yml"
jekyll_source: "docs"
jekyll_destination: "_site"
run_link_check: true
deploy_pages: true
Advanced Jekyll Configuration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
jobs:
docs:
uses: N3b3x/hf-general-ci-tools/.github/workflows/docs.yml@v1
with:
doxygen_config: Doxyfile
deployment_branch: gh-pages
jekyll_enabled: true
jekyll_config: "_config.yml,_config_prod.yml"
jekyll_source: "docs"
jekyll_destination: "_site"
jekyll_environment: "production"
jekyll_safe: true
jekyll_verbose: true
jekyll_strict_front_matter: true
jekyll_drafts: false
jekyll_future: false
jekyll_unpublished: false
run_link_check: true
deploy_pages: true
Custom Configuration
1
2
3
4
5
6
7
8
jobs:
docs:
uses: N3b3x/hf-general-ci-tools/.github/workflows/docs.yml@v1
with:
doxygen_config: docs/Doxyfile.custom
deployment_branch: gh-pages
run_link_check: false
deploy_pages: false
Submodule Documentation Projects
1
2
3
4
5
6
7
8
9
10
11
jobs:
docs:
uses: N3b3x/hf-general-ci-tools/.github/workflows/docs.yml@v1
with:
checkout_recursive: true # Required for submodule-based docs
doxygen_config: Doxyfile
deployment_branch: gh-pages
jekyll_enabled: true
jekyll_source: "docs"
run_link_check: true
link_check_paths: "docs/** *.md **/docs/**"
βοΈ Configuration
Repository Setup
Submodule Checkout
The workflow supports optional recursive submodule checkout for projects that store documentation in submodules:
1
checkout_recursive: true # Enable submodule checkout
When to use recursive checkout:
- Documentation is stored in a separate submodule repository
- Doxygen source files are in submodules
- Jekyll themes or plugins are in submodules
- External documentation dependencies are in submodules
When NOT to use recursive checkout:
- All documentation is in the main repository
- No submodules are present
- Performance optimization (recursive checkout is slower)
Default behavior: false (no submodule checkout)
Optimized Dependency Installation
The workflow uses optimized installation methods for maximum speed:
- Doxygen:
ssciwr/doxygen-install@v1- Pre-built binaries with caching - Graphviz:
tlylt/install-graphviz@v1- Pre-built binaries with caching - Pre-installation Check: Uses pre-installed Graphviz if available (instant)
- Performance: 75-90% faster than traditional
apt-getinstallation
Doxygen Configuration
Create a Doxyfile in your project root:
1
2
3
4
5
6
7
8
9
10
11
12
13
# Basic Doxygen configuration
PROJECT_NAME = "My C++ Project"
PROJECT_NUMBER = 1.0
OUTPUT_DIRECTORY = docs/doxygen
INPUT = src include
FILE_PATTERNS = *.c *.cpp *.h *.hpp
RECURSIVE = YES
GENERATE_HTML = YES
HTML_OUTPUT = html
GENERATE_LATEX = NO
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
Link Checking with Lychee
The workflow includes advanced link checking using Lychee, which provides comprehensive link validation for both internal and external links.
1
2
run_link_check: true # Enable link checking (default: true)
link_check_paths: "docs/** *.md" # Paths to check for broken links
The Lychee link checker:
- Scans all markdown files in the specified paths
- Uses space-separated glob patterns (not comma-separated)
- Validates both internal file references and external URLs
- Supports configurable timeouts and retry attempts
- Excludes private/internal links by default
- Provides detailed reporting with verbose output options
Path Format Examples:
**/*.md- All .md files recursively (default)docs/** *.md- All files in docs/ and all .md files in root (space-separated)README.md docs/**/*.md- Specific file + all .md files in docs/ (space-separated)- Uses the modern
lycheeverse/lychee-action@v2action - Offers better performance and reliability than traditional link checkers
Important: Paths must be space-separated, not comma-separated, as required by lycheeverse/lychee-action@v2.
Markdown Linting
Optional markdown linting using markdownlint-cli to enforce consistent markdown formatting and catch common issues.
1
2
run_markdown_lint: true # Enable markdown linting (default: false)
markdown_lint_paths: "**/*.md" # Glob patterns for files to lint
Features:
- Enforces consistent markdown formatting
- Catches common markdown issues
- Configurable via
.markdownlint.jsonfile - Ignores
node_modulesby default
Spell Checking
Optional spell checking using cspell to catch spelling errors in documentation.
1
2
3
run_spell_check: true # Enable spell checking (default: false)
spell_check_paths: "**/*.md" # Glob patterns for files to check
spell_check_config: ".cspell.json" # Path to cspell config file
Features:
- Catches spelling errors in documentation
- Configurable via
.cspell.jsonfile - Supports custom dictionaries and ignore patterns
- Works with multiple file types
Jekyll Integration
Optional Jekyll static site generation for enhanced documentation presentation and better GitHub Pages integration.
1
2
3
4
jekyll_enabled: true # Enable Jekyll (default: false)
jekyll_config: "_config.yml" # Path to Jekyll config
jekyll_source: "docs" # Source directory
jekyll_destination: "_site" # Build destination
Jekyll Configuration:
The workflow automatically creates a minimal _config.yml file if one doesnβt exist.
For comprehensive Jekyll configuration, see the Jekyll Guide.
Quick Setup:
1
2
3
4
5
6
7
8
# Basic Jekyll configuration
title: "My C++ Project Documentation"
description: "Comprehensive documentation for my C++ project"
baseurl: "" # Set by workflow automatically
url: "https://yourusername.github.io"
theme: minima
markdown: kramdown
highlighter: rouge
Features:
- Static site generation with customizable themes
- Better GitHub Pages integration
- Enhanced navigation and presentation
- Support for custom layouts and includes
- Automatic baseurl configuration for GitHub Pages
- Smart configuration validation with directory-aware checking
- Automatic API reference link injection into Jekyll navigation
Advanced Jekyll Configuration:
The workflow supports extensive Jekyll configuration options for fine-tuned control:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
jekyll_enabled: true
jekyll_config: "_config.yml,_config_prod.yml" # Multiple config files
jekyll_environment: "production" # Environment-specific settings
jekyll_safe: true # Safe mode (GitHub Pages compatible)
jekyll_verbose: true # Verbose output for debugging
jekyll_strict_front_matter: true # Fail on YAML syntax errors
jekyll_drafts: false # Exclude draft posts
jekyll_future: false # Exclude future-dated posts
jekyll_unpublished: false # Exclude unpublished posts
jekyll_incremental: false # Disable incremental builds (CI recommended)
jekyll_lsi: false # Disable LSI (resource-intensive)
jekyll_profile: false # Disable profiling (reduces build time)
jekyll_quiet: false # Enable normal output
jekyll_trace: false # Disable full backtrace
CI-Optimized Defaults: The workflow automatically applies CI-optimized defaults for better reliability:
- Safe mode enabled (prevents custom plugin issues)
- Incremental builds disabled (prevents stale content)
- Profiling disabled (reduces build time)
- Drafts and future posts excluded (focus on published content)
- Strict front matter validation enabled (ensures content integrity)
Standalone Link Check
For repositories that only need link checking without documentation generation, use the dedicated link check workflow:
1
2
3
4
5
6
7
8
9
10
11
12
jobs:
link-check:
uses: N3b3x/hf-general-ci-tools/.github/workflows/docs-link-check.yml@v1
with:
paths: "docs/** *.md **/docs/**" # Paths to check (default: **/*.md)
fail_on_errors: true # Fail on broken links
timeout: "10" # Timeout per link (seconds)
retry: "3" # Number of retries
exclude_private: true # Exclude private links
exclude_mail: true # Exclude mailto links
verbose: false # Verbose output
# Uses lycheeverse/lychee-action@v2 for advanced link checking
π Jekyll Configuration Validation
The workflow includes intelligent Jekyll configuration validation that:
Smart Directory Detection
- Reads your
_config.ymlto determine custom directory locations - Checks directories where theyβre actually configured (e.g.,
_config/_layouts) - Falls back to standard locations if custom paths arenβt specified
- Reports missing directories as βmay be using theme defaultsβ
File Location Validation
- Checks common files (
index.md,404.html,robots.txt) relative to your config file location - If
_config.ymlis indocs/, files are checked indocs/directory - Prevents false warnings about missing files in wrong locations
Configuration Warnings
- Detects trailing slashes in
baseurlandurl(should be avoided) - Validates YAML syntax with specific error reporting
- Provides helpful guidance for common configuration issues
Example Validation Output:
1
2
3
4
5
6
7
8
9
10
11
π Validating Jekyll configuration...
β
Validating config file: _config/_config.yml
β
YAML syntax is valid
β
Found layouts directory: _config/_layouts
β
Found includes directory: _config/_includes
β οΈ Directory not found: _config/_sass (may be using theme defaults)
β
Found file: index.md
β
Found file: 404.html
β
Found file: robots.txt
β οΈ File not found: index.html (optional but recommended)
β
Jekyll configuration validation completed
For detailed validation guidance, see the Jekyll Configuration Guide.
π Automatic API Reference Link Injection
The workflow automatically injects API reference links into your Jekyll configuration when Doxygen is enabled. This provides seamless navigation from your documentation site to the API documentation.
How It Works:
- Detection: When Doxygen is enabled (
doxygen_configis specified), the workflow detects this - URL Generation: Creates the appropriate API reference URL based on version and repository
- Configuration Injection: Automatically adds the link to Jekyllβs
aux_linkssection - Navigation Integration: The link appears in your Jekyll siteβs navigation menu
Generated URL Format:
1
https://username.github.io/repository/version/api/index.html
Examples:
- Development:
https://username.github.io/my-project/development/api/index.html - Stable Release:
https://username.github.io/my-project/v1.2.0/api/index.html - Preview:
https://username.github.io/my-project/preview/api/index.html
Configuration Behavior:
If aux_links section exists:
1
2
3
4
5
6
7
8
9
10
11
# Your existing config
aux_links:
"π Home": "/"
"π Documentation": "/docs/"
# Workflow automatically adds:
aux_links:
"π Home": "/"
"π Documentation": "/docs/"
"π API Reference":
- "/my-project/development/api/index.html"
If aux_links section doesnβt exist:
1
2
3
4
# Workflow creates new section:
aux_links:
"π API Reference":
- "/my-project/development/api/index.html"
Smart Updates:
- Existing API Reference: If an API reference already exists, itβs updated with the new URL
- Version-Aware: The URL automatically reflects the current version being deployed
- Repository-Aware: The URL includes the correct repository name
Benefits:
- β Zero Configuration: Works automatically when Doxygen is enabled
- β Version-Aware: Always points to the correct versionβs API docs
- β
Theme Compatible: Works with any Jekyll theme that supports
aux_links - β
Non-Destructive: Preserves existing
aux_linksconfiguration - β Smart Updates: Updates existing API references instead of duplicating
Versioned Deployment Process
The workflow uses a sophisticated deployment process that maintains versioned documentation:
- Jekyll Site Deployment: Deploys the generated
_sitedirectory to a version folder usingpeaceiris/actions-gh-pages@v3 - Doxygen Artifacts Deployment: Deploys Doxygen artifacts to the root
/doxs/directory usingpeaceiris/actions-gh-pages@v3 - Root Files Update: Clones the
gh-pagesbranch to update root redirects and version selector - Version Metadata: Creates
version_info.jsonfiles in each deployed version directory - Preserve History: Uses
keep_files: trueto maintain all previous versions
GitHub Pages Setup
Important: GitHub Pages must be enabled in your repository settings before using this workflow.
- Enable GitHub Pages in your repository settings:
- Go to Settings β Pages
- Set Source to βGitHub Actionsβ
- Save the settings
- Grant permissions to the workflow:
1
2
3
4
permissions:
contents: write
pages: write
id-token: write
- Workflow behavior:
- If Pages is not enabled, the workflow will continue but skip deployment
- Documentation will still be built and artifacts uploaded
- No errors will occur if Pages is not configured
Access URLs
After deployment, your documentation will be available at:
- Root:
https://username.github.io/repository/β Redirects to latest version - Version Selector:
https://username.github.io/repository/version_selector.html - Specific Version:
https://username.github.io/repository/v1.2.0/ - Development:
https://username.github.io/repository/development/ - API Documentation:
https://username.github.io/repository/v1.2.0/api/ - Centralized API:
https://username.github.io/repository/doxs/v1.2.0/
Versioned Deployment Details
The workflow creates a sophisticated versioned documentation system:
What Gets Deployed Where:
- Jekyll
_site/contents βgh-pages/version/(e.g.,development/,v1.2.0/) viapeaceiris/actions-gh-pages - Doxygen
doxs/contents βgh-pages/doxs/(centralized API docs) viapeaceiris/actions-gh-pages - Root navigation files β
gh-pages/(redirects, version selector, README) via manual git operations
Version Detection:
- Main branch pushes β
development/version - Release branch pushes β
v1.2.0/version (extracted from branch name) - Tag creation β
v1.2.0/version (extracted from tag name) - Other branches β
preview/version
Smart Root Redirects:
- Stable releases β Redirects to specific version (e.g.,
v1.2.0/) - Development β Redirects to
development/ - Preview β Redirects to
development/as fallback
Version Metadata:
Each deployed version includes a version_info.json file with:
1
2
3
4
5
6
7
8
{
"version": "v1.2.0",
"type": "stable",
"deployed_at": "2024-01-15T10:30:00Z",
"commit": "abc123...",
"ref": "refs/tags/v1.2.0",
"doxygen_version": "v1.2.0"
}
π GitHub Pages Setup
Repository Settings
- Go to Settings β Pages
- Set Source to βGitHub Actionsβ
- Ensure GitHub Actions has write permissions
Workflow Permissions
The workflow requires these permissions:
1
2
3
4
permissions:
contents: write # Upload artifacts
pages: write # Deploy to Pages
id-token: write # Authentication
Custom Domain (Optional)
Add a CNAME file to your docs/doxygen/html directory:
1
docs.yourproject.com
π§ Troubleshooting
Common Issues
Doxygen Build Fails
- Verify
Doxyfileexists and is valid - Check source directories exist (
src/,include/) - Graphviz is automatically installed via optimized action (no manual setup needed)
- Verify
doxygen_configpath is correct
Jekyll Configuration Validation Issues
- False warnings about missing directories: Check if your
_config.ymlspecifies custom directory locations (e.g.,layouts_dir: _config/_layouts) - Files not found warnings: Ensure common files (
index.md,404.html,robots.txt) are in the same directory as your_config.yml - Trailing slash warnings: Remove trailing slashes from
baseurlandurlin your configuration - YAML syntax errors: Use online YAML validators or
yqto check syntax
GitHub Pages Not Deploying
- Check repository permissions
- Verify
deploy_pages: true - Ensure workflow runs on main branch (not PRs)
- Enable GitHub Pages in repository settings (Settings β Pages β Source: GitHub Actions)
- Check if Pages site exists and is configured properly
Link Check Fails
- Verify link paths are correct in
link_check_paths - Check that markdown files exist at specified paths
- Review link checker output for specific broken links
Markdown Lint Fails
- Check markdown syntax and formatting
- Review
.markdownlint.jsonconfiguration if present - Fix linting errors reported by markdownlint
Spell Check Fails
- Review spelling errors in documentation
- Add words to
.cspell.jsoncustom dictionary if needed - Check
spell_check_configpath is correct
Debug Mode
Enable debug output:
1
2
env:
ACTIONS_STEP_DEBUG: true
Manual Testing
Test Doxygen locally:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Install Doxygen and Graphviz
# Option 1: Using package manager (slower)
sudo apt-get install doxygen graphviz
# Option 2: Using optimized actions (faster, like in CI)
# For local development, you can use the same actions:
# - ssciwr/doxygen-install@v1 for Doxygen
# - tlylt/install-graphviz@v1 for Graphviz
# Generate docs
doxygen Doxyfile
# Check output
ls docs/doxygen/html/
π§ Troubleshooting
Common Configuration Issues
Sed Syntax Errors
Problem: Workflow fails with sed: -e expression #1, char 44: unterminated 's' command
Cause: Inline comments in configuration files can cause sed syntax errors during processing.
Solution: The workflow now automatically handles inline comments safely. If you encounter this error:
- Check your
_config.ymlfor inline comments:1 2 3
# This is safe title: "My Project" # This comment is handled automatically baseurl: "/my-project" # GitHub Pages subpath
- The workflow automatically:
- Strips inline comments during processing
- Generates clean configuration files
- Prevents sed syntax errors
Example Fix:
1
2
3
4
5
6
# Before (could cause errors in older versions)
baseurl: "/my-project" # GitHub Pages subpath
# After (handled automatically by current workflow)
baseurl: "/my-project" # GitHub Pages subpath
# β This comment is now safely stripped during processing
YAML Validation Issues
Problem: YAML syntax errors in configuration files
Solution: The workflow includes built-in YAML validation:
- Automatic validation - YAML syntax is checked during workflow execution
- Clear error messages - Specific line numbers and error descriptions
- Prevention - Validation runs before configuration processing
Manual validation:
1
2
3
4
5
# Install yamllint
pip install yamllint
# Validate your configuration
yamllint _config.yml
Configuration Generation Failures
Problem: Version-specific configuration generation fails
Solution: The workflow now includes robust configuration processing:
- Comment-safe extraction - Handles inline comments automatically
- Clean generation - Creates
_config_generated.ymlwithout syntax errors - Error prevention - Validates configuration before processing
Check generated configuration:
1
2
# After workflow runs, check the generated file
cat _config_generated.yml
Missing Deployment Branch
Problem: Workflow fails with fatal: Remote branch gh-pages not found in upstream origin
Solution: The workflow automatically creates the deployment branch if it doesnβt exist:
- Auto-detection - Checks if the deployment branch exists
- Auto-creation - Creates the branch from main/master if missing
- Fallback handling - Tries main branch first, then master
- Clear messaging - Provides informative output about branch creation
What happens automatically:
- β
Checks if
gh-pagesbranch exists - β Creates branch from main/master if missing
- β Pushes the new branch to origin
- β Continues with deployment normally
Manual creation (if needed):
1
2
3
# Create gh-pages branch manually
git checkout -b gh-pages
git push origin gh-pages
Git Authentication Errors
Problem: Workflow fails with fatal: could not read Username for 'https://github.com': No such device or address
Solution: The workflow now uses proper GitHub token authentication:
- Automatic authentication - Uses GitHub Actions built-in
GITHUB_TOKENwith proper permissions - Secure URLs - Uses standard HTTPS URLs without token exposure
- No manual setup - Works automatically in GitHub Actions environment
What happens automatically:
- β
Uses GitHub Actions built-in authentication via
contents: writepermission - β Uses standard HTTPS URLs without token exposure
- β Clones and pushes using secure authentication
- β No manual token configuration needed
- β Works with private repositories (with proper permissions)
Technical Details:
- Uses standard HTTPS URLs without embedded tokens
- Relies on
contents: writepermission for authentication - GitHub Actions automatically provides
GITHUB_TOKENwith proper permissions - No token exposure in logs or URLs
π Related Workflows
- C/C++ Lint - Code quality checks
- Static Analysis - Security analysis
- Link Check - Documentation link validation
π Related Resources
| π All Documentation | π Main README |