check for dir existence

This commit is contained in:
Maximilian Keßler 2023-10-17 15:58:57 +02:00
parent 62a02bca05
commit cb1b425550
Signed by: max
GPG Key ID: BCC5A619923C0BA5
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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