-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (43 loc) · 1.44 KB
/
doxygen.yml
File metadata and controls
55 lines (43 loc) · 1.44 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
name: Generate Doxygen Documentation
on:
push:
branches:
- main
workflow_dispatch:
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Install doxygen
uses: ssciwr/doxygen-install@v1
- name: Install graphviz
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y graphviz
- name: Run configure
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCPPSPEC_BUILD_DOCS=ON
# Generate Doxygen documentation
- name: Generate Doxygen documentation
run: cmake --build build --target doxygen
# Deploy to gh-pages branch
- name: Deploy to gh-pages branch
run: |
# Configure Git
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Create or switch to gh-pages branch
git fetch origin gh-pages
git checkout --track origin/gh-pages || git checkout -b gh-pages
# Remove old files and copy new documentation
git rm -rf doxygen || true
mv build/html/ doxygen
touch doxygen/.nojekyll
# Commit and push changes
git add doxygen
git commit -m "Update Doxygen documentation"
git push origin gh-pages --force