diff --git a/action.sh b/action.sh index 981a7a4..79c203a 100755 --- a/action.sh +++ b/action.sh @@ -9,6 +9,11 @@ chmod 600 "${SSH_KEY_FILE}" # set up ssh remote key echo "${INPUT_HOST} ${INPUT_HOST_KEY}" >> ~/.ssh/known_hosts +# check if directory present +if [ ! -d "${INPUT_DIRECTORY}" ]; then + echo "Directory ${INPUT_DIRECTORY} does not exist, aborting deploy." +fi + # optionally: create index if [ "${INPUT_INDEX}" ]; then if [ ! -e "${INPUT_DIRECTORY}/index.html" ]; then diff --git a/action.yaml b/action.yaml index 127d40d..37e3d84 100644 --- a/action.yaml +++ b/action.yaml @@ -24,7 +24,7 @@ inputs: directory: description: > Directory to deploy. - default: pages + default: public index: description: > Whether to create an index.html file recursively listing the directory