-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (30 loc) · 1.17 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
# https://github.com/peaceiris/actions-gh-pages
name: build-docs
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Doxygen & CMake & ninja
run: |
sudo apt install doxygen cmake ninja-build
doxygen --version
cmake --version
ninja --version
- name: Build CMake build_docs target
run: | # this will generate a docs/html/** folder (configured in the Doxyfile)
mkdir build && cd build
cmake .. -GNinja -DBUILD_DOCS=ON
ninja build_docs
- name: Deploy generated documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # NOTE you must enable Read+write permissions in repository Settings -> Actions -> Workflow permissions -> toggle on Read and write permissions
publish_branch: gh-pages
publish_dir: ./docs/html # from
destination_dir: . # deploy to a subdirectory: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-deploy-to-subdirectory-destination_dir
commit_message: docs - ${{ github.event.head_commit.message }}