[1.3.55] 2025-10-18 #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy Documentation | |
| "on": | |
| push: | |
| branches: [ "master", "main" ] | |
| pull_request: | |
| branches: [ "master", "main" ] | |
| types: [opened, synchronize] | |
| # Allow manual trigger | |
| workflow_dispatch: {} | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| name: Build Documentation | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive # Include submodules for doc assets | |
| fetch-depth: 0 # Fetch full history including tags | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y doxygen graphviz cmake build-essential | |
| - name: Verify Doxygen installation | |
| run: | | |
| doxygen --version | |
| - name: Sync version to Doxygen config | |
| run: | | |
| # Get version from git tags (remove 'v' prefix if present) | |
| VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "unknown") | |
| if [ "$VERSION" = "unknown" ]; then | |
| echo "Warning: Could not determine version from git tags, using fallback" | |
| VERSION="dev" | |
| fi | |
| echo "Updating Doxygen PROJECT_NUMBER to: $VERSION" | |
| sed -i "s/^PROJECT_NUMBER.*$/PROJECT_NUMBER = $VERSION/" doc/Doxyfile | |
| - name: Build documentation | |
| run: | | |
| # Build documentation with Doxygen | |
| doxygen doc/Doxyfile | |
| # Verify documentation was generated | |
| ls -la doc/html/ | |
| echo "✓ Documentation built successfully" | |
| - name: Setup Pages | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: doc/html/ | |
| deploy-docs: | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build-docs | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |