File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -211,10 +211,14 @@ jobs:
211
211
env :
212
212
OUTPUT_PATH : ${{ inputs.repository }}-combined.doccarchive
213
213
run : |
214
- find artifacts -type d -name '*.doccarchive' -print0 \
215
- | xargs --null --no-run-if-empty \
216
- sh -c "'$(which docc || xcrun --find docc)' merge \"\$@\" --output-path '${OUTPUT_PATH}'" sh
217
- # We could use `xargs -J` in POSIX - but GNU xargs doesn't have -J...
214
+ if [ "$(find artifacts -type d -name '*.doccarchive' -print | wc -l)" -gt 1 ]; then
215
+ # We could use `xargs -J` in POSIX - but GNU xargs doesn't have -J...
216
+ find artifacts -type d -name '*.doccarchive' -print0 \
217
+ | xargs --null --no-run-if-empty \
218
+ sh -c "'$(which docc || xcrun --find docc)' merge \"\$@\" --output-path '${OUTPUT_PATH}'" sh
219
+ else
220
+ find artifacts -type d -name '*.doccarchive' -exec cp -R '{}' "$(realpath "${OUTPUT_PATH}")" \;
221
+ fi
218
222
- name : Package combined docs
219
223
env :
220
224
REPO_NAME : ${{ inputs.repository }}
You can’t perform that action at this time.
0 commit comments