summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlvntky <klevent1903@gmail.com>2024-11-26 11:14:25 +0300
committerlvntky <klevent1903@gmail.com>2024-11-26 11:14:25 +0300
commitc2eed472d8dfc9e87b51b67bdc029fea89441063 (patch)
tree75aa6f94a3bfbf1e4386e568bbaaa07e685097e3
parent7e11f0d438b7928cc6469629d74ea1fe92e2fbc8 (diff)
[docs] update doxygen and github action
-rw-r--r--.github/workflows/doxygen.yml116
-rw-r--r--docs/Doxyfile14
2 files changed, 108 insertions, 22 deletions
diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml
index f8a2ca3..097615b 100644
--- a/.github/workflows/doxygen.yml
+++ b/.github/workflows/doxygen.yml
@@ -1,44 +1,128 @@
name: Generate and Deploy Doxygen Documentation
-
on:
push:
branches:
- master
+ pull_request:
+ branches:
+ - master
jobs:
- build:
+ build-and-deploy:
runs-on: ubuntu-latest
-
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
- # Install Doxygen and Graphviz
- - name: Set up Doxygen
- run: sudo apt-get install -y doxygen graphviz
+ # Install dependencies
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y doxygen graphviz
- # Clone the m.css repository
+ # Clone m.css
- name: Clone m.css
run: |
- git clone --depth 1 https://github.com/mosra/m.css.git mcss
- ls -R mcss
+ git clone --depth 1 https://github.com/mosra/m.css.git
+
+ # Prepare documentation configuration
+ - name: Prepare Doxygen configuration
+ run: |
+ mkdir -p docs
+ cp mcss/css/m-dark.compiled.css docs/
+ cp mcss/css/m-documentation.compiled.css docs/
+ cp mcss/documentation/search.js docs/
- # Configure m.css by copying necessary files
- - name: Configure m.css
+ # Generate Doxygen configuration file
+ - name: Generate Doxyfile
run: |
- cp mcss/css/m-dark+documentation.compiled.css ./docs/m-dark.css
- cp mcss/css/m-dark.compiled.css ./docs/m-dark.compiled.css
- cp mcss/css/m-light.compiled.css ./docs/m-light.compiled.css
- cp mcss/documentation/search.js ./docs/m.js
+ mkdir -p docs
+ cat > docs/Doxyfile << EOL
+ # General configuration
+ PROJECT_NAME = fbgl
+ PROJECT_NUMBER = 0.1.0
+ PROJECT_BRIEF = "Documentation for the fbgl library"
+ OUTPUT_DIRECTORY = docs
+ CREATE_SUBDIRS = YES
+ OPTIMIZE_OUTPUT_FOR_C = YES
+ GENERATE_HTML = YES
+ GENERATE_LATEX = NO
+ GENERATE_MAN = NO
+ GENERATE_RTF = NO
+ GENERATE_XML = NO
+
+ # Input sources
+ INPUT = fbgl.h README.md
+ FILE_PATTERNS = *.h README.md
+ RECURSIVE = NO
+ EXCLUDE_PATTERNS = test/*
+
+ # Markdown support
+ USE_MDFILE_AS_MAINPAGE = README.md
+ MARKDOWN_SUPPORT = YES
+
+ # Extract documentation
+ EXTRACT_ALL = YES
+ EXTRACT_PRIVATE = NO
+ EXTRACT_STATIC = YES
+ EXTRACT_LOCAL_CLASSES = YES
+ EXTRACT_LOCAL_METHODS = YES
+
+ # Source browsing
+ SOURCE_BROWSER = YES
+ INLINE_SOURCES = YES
+ REFERENCED_BY_RELATION = YES
+ REFERENCES_RELATION = YES
+
+ # Documentation styling for m.css
+ HTML_OUTPUT = html
+ HTML_EXTRA_STYLESHEET = \
+ "m-dark.compiled.css" \
+ "m-documentation.compiled.css"
+ HTML_DYNAMIC_SECTIONS = YES
+ GENERATE_TREEVIEW = YES
+
+ # Search functionality
+ SEARCHENGINE = YES
+ SERVER_BASED_SEARCH = NO
+ EXTERNAL_SEARCH = NO
+ SEARCHDATA_FILE = searchdata.xml
+
+ # Warnings
+ WARNINGS = YES
+ WARN_IF_UNDOCUMENTED = YES
+ WARN_NO_PARAMDOC = YES
+ WARN_FORMAT = "\$file:\$line: \$text"
+
+ # Extra configurations
+ ALIASES = "note=\par\textbf{Note:}"
+ ALIASES += "todo=\par\textbf{TODO:}"
+ ALIASES += "bug=\par\textbf{Bug:}"
+ EXCLUDE_SYMBOLS = "*Test*"
+
+ # Graph and diagram support
+ HAVE_DOT = YES
+ DOT_GRAPH_MAX_NODES = 50
+ DOT_TRANSPARENT = YES
+ DOT_IMAGE_FORMAT = svg
+ CALL_GRAPH = YES
+ CALLER_GRAPH = YES
+ CLASS_DIAGRAMS = YES
+ DOT_MULTI_TARGETS = YES
+ EOL
# Generate Doxygen documentation
- name: Generate Doxygen documentation
run: doxygen docs/Doxyfile
- # Deploy the generated documentation to GitHub Pages
+ # Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/html
+ force_orphan: true
+ full_commit_message: Update documentation \ No newline at end of file
diff --git a/docs/Doxyfile b/docs/Doxyfile
index 2b9bdbc..f70b975 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -34,15 +34,17 @@ INLINE_SOURCES = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
-# Documentation styling
+# Documentation styling for m.css
HTML_OUTPUT = html
+HTML_EXTRA_STYLESHEET =
+ "mcss/css/m-dark.compiled.css" \
+ "mcss/css/m-documentation.compiled.css"
+HTML_HEADER = "header.html"
+HTML_FOOTER = "footer.html"
+HTML_STYLESHEET =
HTML_DYNAMIC_SECTIONS = YES
GENERATE_TREEVIEW = YES
-# Integrating Doxygen with m.css
-HTML_EXTRA_STYLESHEET = ./m-dark.css
-HTML_EXTRA_FILES = ./m.js
-
# Warnings
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
@@ -63,4 +65,4 @@ DOT_IMAGE_FORMAT = svg
CALL_GRAPH = YES
CALLER_GRAPH = YES
CLASS_DIAGRAMS = YES
-DOT_MULTI_TARGETS = YES
+DOT_MULTI_TARGETS = YES \ No newline at end of file