File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -90,12 +90,14 @@ echo Temp directory \"$build_dir\" is created
9090
9191echo ::group:: Running Sphinx builder
9292if ! sphinx-build -b html $INPUT_SPHINX_BUILD_OPTIONS " $doc_dir " " $build_dir " ; then
93- # See: https://github.com/sphinx-notes/pages/issues/28
94- # echo ::endgroup::
95- # echo ::group:: Dumping Sphinx error log
96- # for l in $(ls /tmp/sphinx-err*); do
97- # cat $l
98- # done
93+ echo ::group:: Dumping Sphinx traceback
94+ for l in $( find /tmp -name ' sphinx-err*.log' ) ; do
95+ # Replace "\n" to "%0A" for supporting multiline text in the error message.
96+ # https://github.com/actions/toolkit/issues/193#issuecomment-605394935
97+ traceback=$( tail -n100 $l | awk ' { printf "%s%%0A", $0 }' )
98+ echo " ::error title=Sphinx traceback::$traceback "
99+ done
100+ echo ::endgroup::
99101 exit 1
100102fi
101103echo ::endgroup::
You can’t perform that action at this time.
0 commit comments