-
-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (74 loc) · 2.37 KB
/
Copy pathgenerate_docs.yml
File metadata and controls
88 lines (74 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Copyright Dominic (DNKpp) Koepke 2025.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# https://www.boost.org/LICENSE_1_0.txt)
name: generate docs
on:
push:
branches: [ main, development ]
pull_request:
branches: [ main, development ]
release:
types: [ released ]
jobs:
create-documentation:
runs-on: ubuntu-latest
# this is required for the gh-pages deployment
permissions:
contents: write
steps:
- uses: actions/checkout@v6
# we must configure, because the Doxyfile is generated via cmake
- name: Configure
run: |
cmake \
-S . \
-B build \
--log-level=VERBOSE \
-DGIMO_CONFIGURE_DOXYGEN=ON \
-DGIMO_BUILD_TESTS=OFF \
-DGIMO_BUILD_BENCHMARKS=OFF \
-DGIMO_BUILD_EXAMPLES=OFF
- name: Generate Doxygen Documentation
uses: mattnotmitt/doxygen-action@edge
with:
doxyfile-path: build/docs/Doxyfile
- name: Upload html documentation
uses: actions/upload-artifact@v7
with:
name: HTML-Documentation
path: build/docs/html
# publish to main gh-pages, when main branch is pushed
- name: Deploy to GitHub main Pages
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs/html
release-documentation:
runs-on: ubuntu-latest
needs: create-documentation
if: ${{ github.event_name == 'release' }}
# this is required for the asset attachment
permissions:
contents: write
steps:
- uses: actions/download-artifact@v8
with:
name: HTML-Documentation
path: ./documentation
- name: zip documentation
uses: thedoctor0/zip-release@0.7.6
with:
type: 'zip'
filename: "documentation.zip"
path: ./documentation
- name: attach release assets
uses: ncipollo/release-action@v1
with:
artifacts: "documentation.zip"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifactErrorsFailBuild: true
omitBody: true
omitName: true