Skip to content

Commit 58e1e5c

Browse files
committed
fix(docs): replace doxygen workflow
with doxygen + breathe + sphinx workflow
1 parent af88da7 commit 58e1e5c

8 files changed

Lines changed: 92 additions & 30 deletions

File tree

.github/workflows/docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Generate and Deploy Documentation
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
jobs:
7+
build-and-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Repository
11+
uses: actions/checkout@v3
12+
- name: Install Dependencies
13+
run: |
14+
sudo apt-get update
15+
sudo apt-get install -y doxygen graphviz
16+
python -m pip install --upgrade pip
17+
pip install -r docs/requirements.txt
18+
- name: Generate Doxygen XML
19+
run: |
20+
mkdir -p build/doxygen
21+
doxygen Doxyfile
22+
- name: Build Sphinx Documentation
23+
run: |
24+
sphinx-build -b html docs/ build/sphinx/html
25+
- name: Deploy to GitHub Pages
26+
if: github.ref == 'refs/heads/main'
27+
uses: peaceiris/actions-gh-pages@v3
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: ./build/sphinx/html

.github/workflows/doxygen.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Doxyfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
PROJECT_NAME = Parrot
2-
OUTPUT_DIRECTORY = docs
3-
GENERATE_HTML = YES
4-
RECURSIVE = YES
5-
INPUT = src
6-
QUIET = YES
7-
GENERATE_LATEX = NO
8-
HTML_EXTRA_FILES = docs/theme/doxygen-awesome-darkmode-toggle.js
9-
HTML_EXTRA_STYLESHEET = docs/theme/doxygen-awesome.css
10-
HTML_HEADER = docs/theme/header.html
1+
# Doxyfile Configuration
2+
3+
# Directories to scan for source code
4+
INPUT = ./src
5+
6+
# Generate XML output for Breathe
7+
GENERATE_XML = YES
8+
9+
# Optional: Disable HTML output if not needed
10+
GENERATE_HTML = NO

docs/api.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
API Reference
2+
=============
3+
4+
.. doxygenindex::
5+
:project: Parrot

docs/conf.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
import sys
3+
4+
sys.path.insert(0, os.path.abspath('../src'))
5+
6+
# project
7+
project = 'Parrot'
8+
author = 'Florian Burger'
9+
# extensions
10+
extensions = [
11+
'breathe',
12+
]
13+
# config
14+
breathe_projects = {
15+
f"{project}": "../build/doxygen/xml"
16+
}
17+
breathe_default_project = f"{project}"
18+
# theme
19+
html_theme = 'sphinx_rtd_theme'

docs/index.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. MyProject documentation main file, created by
2+
sphinx-quickstart on <date>.
3+
4+
Welcome to Parrot's Documentation
5+
====================================
6+
7+
.. toctree::
8+
:maxdepth: 2
9+
:caption: Contents:
10+
11+
overview
12+
api
13+
14+
Indices and Tables
15+
==================
16+
17+
* :ref:`genindex`
18+
* :ref:`modindex`
19+
* :ref:`search`

docs/overview.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Overview
2+
========
3+
4+
This is an overview of the project architecture, goals, and usage.
5+
6+
You can include any content here: Markdown-like syntax, code snippets, images, etc.

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sphinx
2+
breathe
3+
sphinx-rtd-theme

0 commit comments

Comments
 (0)