Doxygen: Build documentation and host on GitHub Pages (#128) #1
This file contains 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: CMake | |
on: | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
documenation: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Doxygen | |
run: sudo apt-get install -y doxygen graphviz | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 | |
- name: Generate Documentation | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config Debug --target docs | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3.0.1 | |
with: | |
path: ${{github.workspace}}/build/docs | |
- name: Deploy artifact | |
uses: actions/deploy-pages@v4 |