-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.29 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
name: Documentation
on:
push:
paths:
- doc/**
- .github/workflows/docs.yml
workflow_dispatch: ~
env:
BUILD_TYPE: Release
SOURCE_DIR: ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/build
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Set CMake Parallel level
run: |
echo "CMAKE_BUILD_PARALLEL_LEVEL=${{ steps.cpu-cores.outputs.count }}" >> ${GITHUB_ENV}
#######################
# BUILD
#######################
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Configure CMake
shell: bash
run: cmake -S "${SOURCE_DIR}" -B "${BUILD_DIR}" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_EXEC=Off -DBUILD_DOC=On
- name: Build
shell: bash
run: cmake --build "${BUILD_DIR}" --target mobile_sacn_doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.BUILD_DIR }}/doc/html
cname: docs.mobilesacn.dankeenan.org