Skip to content

Commit 798eeff

Browse files
committed
fix: Use sphinxnotes-incrbuild when INPUT_CACHE enabled
1 parent 33a4613 commit 798eeff

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

main.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,13 @@ echo ::group:: Running Sphinx builder
6565
build_dir=/tmp/sphinxnotes-pages
6666
mkdir -p $build_dir || true
6767
echo Temp directory \"$build_dir\" is created
68-
if ! sphinxnotes-incrbuild -b html $INPUT_SPHINX_BUILD_OPTIONS "$doc_dir" "$build_dir"; then
69-
echo ::group:: Dumping Sphinx traceback
70-
for l in $(find /tmp -name 'sphinx-err*.log'); do
68+
if [ "$INPUT_CACHE" == "true" ]; then
69+
sphinx_build=sphinxnotes-incrbuild
70+
else
71+
sphinx_build=sphinx-build
72+
fi
73+
if ! $sphinx_build -b html $INPUT_SPHINX_BUILD_OPTIONS "$doc_dir" "$build_dir"; then
74+
for l in $(find /tmp -name 'sphinx-err*.log' 2>/dev/null); do
7175
# Replace "\n" to "%0A" for supporting multiline text in the error message.
7276
# https://github.com/actions/toolkit/issues/193#issuecomment-605394935
7377
traceback=$(tail -n500 $l | awk '{ printf "%s%%0A", $0 }')

0 commit comments

Comments
 (0)