Skip to content

Commit 0ccf951

Browse files
committed
Move documentation to a separate Github action from compile/tests
1 parent b877b51 commit 0ccf951

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ jobs:
88
build:
99
name: ${{ matrix.config.name }}
1010
runs-on: ${{ matrix.config.os }}
11-
env:
12-
HDOC_PROJECT_API_KEY: ${{ secrets.HDOC_PROJECT_API_KEY }}
1311
strategy:
1412
fail-fast: false
1513
matrix:
@@ -166,13 +164,6 @@ jobs:
166164
message(FATAL_ERROR "Running tests failed!")
167165
endif()
168166
169-
- name: Documentation
170-
if: ${{ startsWith(matrix.config.cxx, 'g++') && env.HDOC_PROJECT_API_KEY != '' }}
171-
uses: hdoc/hdoc-github-action@v2
172-
with:
173-
compile-commands-path: out/compile_commands.json
174-
hdoc-api-key: ${{ env.HDOC_PROJECT_API_KEY }}
175-
176167
- name: Install Strip
177168
run: cmake --install out --prefix instdir --strip
178169

.github/workflows/docs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
docs:
9+
name: Generate documentation
10+
if: github.repository == 'chromium/subspace'
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
16+
- name: Configure
17+
run: |
18+
sudo apt install build-essential cmake ninja-build
19+
cmake -G Ninja -B out -D CMAKE_EXPORT_COMPILE_COMMANDS=1
20+
21+
- name: Documentation
22+
uses: hdoc/hdoc-github-action@v2
23+
with:
24+
compile-commands-path: out/compile_commands.json
25+
hdoc-api-key: ${{ secrets.HDOC_PROJECT_API_KEY }}

0 commit comments

Comments
 (0)