Skip to content

Commit 261f8c4

Browse files
authored
fix if condition with empty string
1 parent aa1bbd3 commit 261f8c4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/build-docs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ jobs:
186186
187187
- name: Build all docs
188188
if: ${{ inputs.component == 'all' }}
189-
env:
190-
DOC_ACTION: ${{ (inputs.is-release && '') || 'latest-only' }}
191189
run: |
192190
pushd cuda_python/docs/
193-
./build_all_docs.sh $DOC_ACTION
194-
if [[ -z "$DOC_ACTION" ]]; then
191+
if [[ "${{ inputs.is-release }}" == "false" ]]; then
192+
./build_all_docs.sh latest-only
193+
else
194+
./build_all_docs.sh
195195
# At release time, we don't want to update the latest docs
196196
rm -rf build/html/latest
197197
fi
@@ -201,13 +201,13 @@ jobs:
201201
202202
- name: Build component docs
203203
if: ${{ inputs.component != 'all' }}
204-
env:
205-
DOC_ACTION: ${{ (inputs.is-release && '') || 'latest-only' }}
206204
run: |
207205
COMPONENT=$(echo "${{ inputs.component }}" | tr '-' '_')
208206
pushd ${COMPONENT}/docs/
209-
./build_docs.sh $DOC_ACTION
210-
if [[ -z "$DOC_ACTION" ]]; then
207+
if [[ "${{ inputs.is-release }}" == "false" ]]; then
208+
./build_docs.sh latest-only
209+
else
210+
./build_docs.sh
211211
# At release time, we don't want to update the latest docs
212212
rm -rf build/html/latest
213213
fi

0 commit comments

Comments
 (0)