From 91d4d9c94a0a3c6de99d86e3c9bc928548c3c400 Mon Sep 17 00:00:00 2001 From: Shengyu Zhang Date: Sat, 5 Dec 2020 23:23:31 +0800 Subject: [PATCH] Fix installation of requirement.txt --- main.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main.sh b/main.sh index ebecbfe..f3dd6f6 100755 --- a/main.sh +++ b/main.sh @@ -46,13 +46,16 @@ else fi echo ::endgroup:: -echo ::group:: Installing requirements if [ "$INPUT_INSTALL_REQUIREMENTS" = "true" ] ; then - pip3 install -r $doc_dir/requirements.txt -else - echo Skipped + echo ::group:: Installing requirements + if [ -f "$doc_dir/requirements.txt" ]; then + echo Installing python requirements + pip3 install -r $doc_dir/requirements.txt + else + echo No requirements.txt found, skipped + fi + echo ::endgroup:: fi -echo ::endgroup:: echo ::group:: Creating temp directory tmp_dir=$(mktemp -d -t pages-XXXXXXXXXX)