check for dir existence
This commit is contained in:
parent
62a02bca05
commit
cb1b425550
2 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,11 @@ chmod 600 "${SSH_KEY_FILE}"
|
||||||
# set up ssh remote key
|
# set up ssh remote key
|
||||||
echo "${INPUT_HOST} ${INPUT_HOST_KEY}" >> ~/.ssh/known_hosts
|
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
|
# optionally: create index
|
||||||
if [ "${INPUT_INDEX}" ]; then
|
if [ "${INPUT_INDEX}" ]; then
|
||||||
if [ ! -e "${INPUT_DIRECTORY}/index.html" ]; then
|
if [ ! -e "${INPUT_DIRECTORY}/index.html" ]; then
|
||||||
|
|
|
@ -24,7 +24,7 @@ inputs:
|
||||||
directory:
|
directory:
|
||||||
description: >
|
description: >
|
||||||
Directory to deploy.
|
Directory to deploy.
|
||||||
default: pages
|
default: public
|
||||||
index:
|
index:
|
||||||
description: >
|
description: >
|
||||||
Whether to create an index.html file recursively listing the directory
|
Whether to create an index.html file recursively listing the directory
|
||||||
|
|
Loading…
Reference in a new issue