-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (61 loc) · 1.59 KB
/
docs.yml
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
name: Publish Docs
on:
push:
tags:
- '**'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive' # for doxygen-awesome-css
-
name: install doxygen 1.9.2
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
-
name: set version
run: |
_version_tag=$(git describe --tags)
_cmake_version=v$(grep "^[ \t]*VERSION" CMakeLists.txt | sed 's/[^.0-9]*//g')
if [[ "${_version_tag}" != "${_cmake_version}" ]]; then
echo "::error::Git version ${_version_tag} does not match CMake version ${_cmake_version}"
exit 1
fi
echo ${_version_tag}
echo "PROJECT_NUMBER = ${_version_tag}" >> docs/doxyfile
-
name: run doxygen
run: doxygen docs/doxyfile
-
name: Setup Pages
id: pages
uses: actions/configure-pages@v5
-
name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/html
deploy:
if: startsWith(github.ref, 'refs/tags/v')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4