-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (56 loc) · 1.98 KB
/
build-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
name: Build and publish Docs
on:
release:
types: [published]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Generate Cache Key
id: cache-key
uses: actions/github-script@v6
env:
OS: ubuntu-latest
COMPILER_NAME: llvm
COMPILER_VERSION: 15.0.2
BUILD_TYPE: Release
CONANFILE_HASH: ${{ hashFiles('conanfile.py') }}
with:
result-encoding: string
script: |
const { OS, COMPILER_NAME, COMPILER_VERSION, BUILD_TYPE, CONANFILE_HASH } = process.env
return `${OS}-${COMPILER_NAME}-${COMPILER_VERSION}-${BUILD_TYPE}-${CONANFILE_HASH}`
- name: Cache Conan
uses: actions/cache@v3
with:
path: ~/.conan/
key: ${{steps.cache-key.outputs.result}}
- name: Setup Build Tools
uses: aminya/setup-cpp@v1
with:
cmake: true
conan: true
ninja: true
doxygen: true
graphviz: true
compiler: llvm-15.0.2
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake .. -DENABLE_DOXYGEN=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_PATH_PREFIX=~/llvm/ -G "Ninja"
- name: Generate Docs
run: cmake --build . --target doxygen-docs
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./build/html
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com
full_commit_message: Update docs for ${{ github.event.release.tag_name }}