Skip to content

Prepare for the future #47

Prepare for the future

Prepare for the future #47

Workflow file for this run

name: Deploy doxygen docs
on:
push:
tags:
- 'v*'
branches: ["main"]
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: ssciwr/doxygen-install@v1
with:
version: "1.12.0"
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.30.0" # <--= optional, use most recent 3.25.x version
ninjaVersion: "^1.11.1" # <--= optional, use most recent 1.x version
- name: Checkout
uses: actions/checkout@v4
# For doc gen present should not be used, since the multi config is not needed, but keep that for now
- name: Run workflow to get coverage docs
run: cmake --preset ninja -DTOOLCHAIN_INCLUDES=toolchain/use-vcpkg -DPROJECT_ADDONS='add-on/coverage-gcov'
- name: Build project
run: cmake --build --preset ninja --parallel
- name: Run tests
run: ctest --preset ninja --parallel
- name: Build documentation
run: cmake --build --preset ninja --parallel --target doc
- name: Build coverage docs
run: cmake --build --preset ninja --target coverage
- name: Add coverage to docs
run: mv build/Linux/ninja/coverage/html build/Linux/ninja/doc/html/coverage
- name: Upload site artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'build/default/doc/html/'
deploy:
needs: build
# if: github.ref == 'refs/heads/main'
# todo, switch to update pages only for new releases
if: startsWith(github.ref, 'refs/tags/v')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4