-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (47 loc) · 1.71 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
name: 'Docs'
env:
CMAKE_VERSION: '3.16.x'
CMAKE_BUILD_TYPE: 'Release'
CMAKE_BUILD_PREFIX: './build'
on:
push:
pull_request:
jobs:
docs:
runs-on: macos-latest
name: '📚 Docs'
steps:
- name: '🧰 Checkout'
uses: actions/[email protected]
with:
fetch-depth: 0
- name: '🟨 Install required packages'
run: brew install doxygen
&& brew install mscgen
&& brew install --cask dia
&& brew install graphviz
&& brew install --cask basictex
&& pip3 install sphinx
&& pip3 install sphinx-rtd-theme
&& pip3 install sphinx-sitemap
&& pip3 install sphinxcontrib-moderncmakedomain
&& pip3 install breathe
- name: '🟨 Setup CMake'
uses: jwlawson/[email protected]
with:
cmake-version: '${{env.CMAKE_VERSION}}'
github-api-token: ${{ secrets.GITHUB_TOKEN }}
- name: '🔧 Configure'
run: cmake -S . -B ${{ env.CMAKE_BUILD_PREFIX }} -D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -D BUILD_ONLY_DOCS=ON
- name: '⚙️ Build'
run: cmake --build ${{ env.CMAKE_BUILD_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel 2 --target docs
- name: '📥 Install'
run: cmake --install ${{ env.CMAKE_BUILD_PREFIX }} --prefix ${{ github.workspace }}/bin --strip
&& touch ${{ github.workspace }}/bin/docs/html/.nojekyll
- name: '🎉 Deploy'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: ${{ github.workspace }}/bin/docs/html # The folder the action should deploy.
SINGLE_COMMIT: true