Skip to content

Commit

Permalink
Merge pull request #62 from antoniovazquezblanco/dev/doxy
Browse files Browse the repository at this point in the history
Add doxygen documentation with deployment
  • Loading branch information
BatchDrake authored Jun 17, 2023
2 parents a4660dc + 15dcc87 commit d610516
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Documentation

on: [push, pull_request, workflow_dispatch]

permissions:
id-token: write
pages: write

jobs:
build-documentation:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get install libsndfile1-dev libvolk2-dev libfftw3-dev doxygen

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Build documentation
uses: "./.github/actions/build"
with:
target: doxygen

- name: Upload documentation artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: build/doc/html/

- name: Setup Pages
if: contains('develop', github.ref)
uses: actions/configure-pages@v3
with:
enablement: true

- name: Upload documentation to Github Pages
if: contains('develop', github.ref)
uses: actions/upload-pages-artifact@v1
with:
path: build/doc/html/

- name: Deploy to GitHub Pages
if: contains('develop', github.ref)
uses: actions/deploy-pages@v2
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ project(

# The library code is in src
add_subdirectory(src)

# The documentation is in doc
add_subdirectory(doc)
12 changes: 12 additions & 0 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Check for the required dependencies
find_package(Doxygen)

if (NOT DOXYGEN_FOUND)
message("Doxygen needs to be installed to generate the documentation")
else()
# Instruct Doxygen to generate HTML output
set(DOXYGEN_GENERATE_HTML YES)

# Add a Doxygen target
doxygen_add_docs(doxygen "../src")
endif()

0 comments on commit d610516

Please sign in to comment.