From dfb77829f792d099b700fc12b8d023ee4775d973 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Fri, 24 May 2024 09:33:52 +1200 Subject: [PATCH] FIX Don't try to build resources that can't be built (#38) --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index fc29a01..77aea64 100644 --- a/action.yml +++ b/action.yml @@ -239,10 +239,10 @@ runs: git pull # Determine if we will rebuild dist file during merge-up - # This is based simply on if there are changes in the client/ directory + # This is based simply on if there are changes in the client/ directory and if there's a package.json file REBUILD=0 CLIENT_DIFF_FILES=$(git diff --name-only $INTO_BRANCH...$FROM_BRANCH | grep -P ^client/) || true - if [[ $CLIENT_DIFF_FILES != "" ]]; then + if [[ $CLIENT_DIFF_FILES != "" && -f "package.json" ]]; then REBUILD=1 fi echo "CLIENT_DIFF_FILES is:"