Skip to content

Commit 82772cc

Browse files
authoredSep 17, 2024··
Merge pull request #14 from soraxas/feat-build-doc
Add action to auto build and deploy doc
2 parents cc4a8a9 + 6ab2aa9 commit 82772cc

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
 

‎.github/workflows/docs.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches: [ "main", "feat-build-doc" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Install dependencies
15+
run: sudo apt-get update && sudo apt-get install -y graphviz doxygen
16+
shell: bash
17+
18+
- name: build_doxygen
19+
run: |
20+
# bootstrap rock
21+
git clone https://github.com/rock-core/base-cmake.git
22+
cmake -Bbuild/rock base-cmake -DCMAKE_INSTALL_PREFIX=build/install
23+
make -Cbuild/rock install
24+
export CMAKE_PREFIX_PATH=build/install/share/rock/cmake/:$CMAKE_PREFIX_PATH
25+
# get doxygen to trigger generation
26+
# build the doxyfile
27+
cmake -Bbuild . || true # building doc does not need build deps
28+
29+
- name: move doc with figures into a tmp folder
30+
run: mv doc doc_tmp
31+
32+
- name: Generate Doxygen Documentation
33+
run: doxygen build/Doxyfile
34+
shell: bash
35+
36+
- name: Create .nojekyll (ensures pages with underscores work on gh pages)
37+
run: touch doc/.nojekyll
38+
shell: bash
39+
40+
- name: move figures into the actual doc
41+
run: mv doc_tmp doc/doc
42+
43+
- name: Deploy to GitHub Pages
44+
uses: JamesIves/github-pages-deploy-action@v4
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
branch: gh-pages
48+
folder: doc
49+

0 commit comments

Comments
 (0)
Please sign in to comment.