Skip to content

.github/workflows/github-pages.yml #19

.github/workflows/github-pages.yml

.github/workflows/github-pages.yml #19

Workflow file for this run

# This workflow deploys the Doxygen documentation to the
# github pages for this project.
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
docs:
name: Generate documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt install doxygen
name: Install Doxygen
- run: doxygen Doxyfile
name: Run Doxygen
- uses: actions/upload-artifact@v4
with:
name: docs-html
path: html
coverage:
name: Generate coverage report
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt install check gcovr
- uses: actions/checkout@v4
- name: Configure
run: cmake -S . -B build -DBUILD_COVERAGE=ON
- name: Build
run: cmake --build build
- name: Run tests
run: ctest --test-dir build
- name: Generate coverage report with gcovr
run: |
mkdir html
cd build
gcovr --html-details ../html/coverage.html -r ..
- uses: actions/upload-artifact@v4
with:
name: coverage-html
path: html
combine:
name: Combine site parts
runs-on: ubuntu-latest
needs: [docs, coverage]
steps:
- uses: actions/upload-download@v4
with:
name: docs-html
path: html
- uses: actions/upload-download@v4
with:
name: coverage-html
path: html
- uses: actions/upload-pages-artifact@v3
with:
path: html
deploy:
name: Deploy documentation to Github Pages
needs: combine
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4