-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (41 loc) · 1.27 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
name: Document
on:
push:
tags:
- 'v*'
workflow_dispatch:
defaults:
run:
shell: bash -ileo pipefail {0}
jobs:
docs:
name: "Build & Deploy Documents"
runs-on: ubuntu-latest
container:
image: mayjojo/cxx-cmake-project-template:main
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Documents
run: |
set -eux
CPUS=$(grep -c ^processor /proc/cpuinfo)
cmake --preset cmake-dev-release-benchmark
cd ${GITHUB_WORKSPACE}/cmake-dev-release-benchmark
make docs
ls -la ${GITHUB_WORKSPACE}/cmake-dev-release-benchmark/html/
- name: Deploy Documents
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: cmake-dev-release-benchmark/html/
destination_dir: latest
- name: Deploy Documents
uses: peaceiris/actions-gh-pages@v4
if: ${{ startsWith(github.ref, 'refs/heads/tags/v') }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: cmake-dev-release-benchmark/html/
destination_dir: ${{ env.GITHUB_REF_NAME }}