Skip to content

Commit b877b51

Browse files
committed
Don't generate docs when there's no API key
1 parent 1d34e69 commit b877b51

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ 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 }}
1113
strategy:
1214
fail-fast: false
1315
matrix:
@@ -165,11 +167,11 @@ jobs:
165167
endif()
166168
167169
- name: Documentation
168-
if: startsWith(matrix.config.cxx, 'g++')
170+
if: ${{ startsWith(matrix.config.cxx, 'g++') && env.HDOC_PROJECT_API_KEY != '' }}
169171
uses: hdoc/hdoc-github-action@v2
170172
with:
171173
compile-commands-path: out/compile_commands.json
172-
hdoc-api-key: ${{ secrets.HDOC_PROJECT_API_KEY }}
174+
hdoc-api-key: ${{ env.HDOC_PROJECT_API_KEY }}
173175

174176
- name: Install Strip
175177
run: cmake --install out --prefix instdir --strip

0 commit comments

Comments
 (0)