From 94b7ca0f886872bcb6ade2a61ff891605d2c85e5 Mon Sep 17 00:00:00 2001 From: lvntky Date: Tue, 26 Nov 2024 12:03:53 +0300 Subject: [docs] updated actions --- .github/workflows/doxygen.yml | 59 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index c1c156f..0060c1a 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -34,7 +34,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install jinja2 Pygments + pip install jinja2 Pygments rcssmin - name: Clone m.css run: | @@ -42,10 +42,24 @@ jobs: - name: Prepare m.css stylesheets run: | - # Compile m.css stylesheets + # Navigate to m.css css directory cd m.css/css - python3 -m pip install rcssmin - python3 ../documentation/css.py + + # Create compiled CSS manually + cat << EOF > m-documentation.compiled.css + /* Minimal CSS fallback */ + body { font-family: sans-serif; line-height: 1.6; max-width: 800px; margin: 0 auto; padding: 1rem; } + h1, h2 { color: #333; } + pre { background-color: #f4f4f4; padding: 1rem; overflow-x: auto; } + EOF + + cat << EOF > m-dark.compiled.css + /* Minimal dark theme CSS fallback */ + body { background-color: #121212; color: #e0e0e0; } + a { color: #4CAF50; } + pre { background-color: #1e1e1e; color: #e0e0e0; } + EOF + cd ../.. - name: Generate Doxyfile @@ -83,16 +97,37 @@ jobs: run: | doxygen Doxyfile - - name: Process Documentation with m.css + - name: Process Documentation with m.css (Fallback Strategy) run: | + # Try m.css processing, but have a backup plan + set +e python m.css/documentation/doxygen.py Doxyfile - continue-on-error: true # Allow workflow to continue if m.css processing fails - - - name: Ensure Documentation Exists - run: | - # Fallback if m.css processing fails - [ -d "docs/html" ] || mkdir -p docs/html - [ -f "docs/html/index.html" ] || echo "Documentation generation failed" > docs/html/index.html + + # If m.css processing fails, create a basic index + if [ $? -ne 0 ]; then + echo "M.css processing failed. Creating fallback documentation." + + # Create a basic index.html + cat << EOF > docs/html/index.html + + + + + FBGL Documentation + + + +

FBGL Documentation

+

Documentation generation encountered an issue. Please check the repository for the most up-to-date information.

+

View the project on GitHub for more details.

+ + + EOF + fi - name: Setup GitHub Pages uses: actions/configure-pages@v3 -- cgit v1.2.3