Skip to content

Commit dcb3fa5

Browse files
committed
Add CI job to build doxygen docs
1 parent ec44588 commit dcb3fa5

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/build-cmake.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,47 @@ jobs:
253253
files: build/coverage.info
254254
token: ${{ secrets.CODECOV_TOKEN }}
255255
fail_ci_if_error: true
256+
257+
doxygen:
258+
name: Doxygen → GitHub Pages
259+
runs-on: ubuntu-24.04
260+
# Only deploy on pushes to main; skip on pull requests and other branches.
261+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
262+
# Gate on the full build-and-test matrix so broken code never gets
263+
# published docs.
264+
needs: build-and-test
265+
permissions:
266+
pages: write # required to deploy to GitHub Pages
267+
id-token: write # required for OIDC token used by deploy-pages
268+
# Prevent concurrent deployments; a second push to main while a deploy
269+
# is running waits rather than cancelling the in-flight deployment.
270+
concurrency:
271+
group: github-pages
272+
cancel-in-progress: false
273+
environment:
274+
name: github-pages
275+
url: ${{ steps.deployment.outputs.page_url }}
276+
277+
steps:
278+
- name: Checkout
279+
uses: actions/checkout@v7
280+
281+
- name: Install Doxygen and Graphviz
282+
run: |
283+
sudo apt-get update -qq
284+
sudo apt-get install -y doxygen graphviz
285+
286+
- name: Configure
287+
run: cmake -B build -DBUILD_DOCS=ON
288+
289+
- name: Build Doxygen HTML
290+
run: cmake --build build --target doxygen
291+
292+
- name: Upload Pages artifact
293+
uses: actions/upload-pages-artifact@v3
294+
with:
295+
path: build/docs/doxygen/html
296+
297+
- name: Deploy to GitHub Pages
298+
id: deployment
299+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)