Add configuration-File support.

This commit is contained in:
Frank Agerholm 2024-12-04 21:44:12 +01:00
commit ce035d9186
No known key found for this signature in database
3 changed files with 73 additions and 10 deletions

View file

@ -1,7 +1,16 @@
#!/bin/sh
# Default configurations:
DEPLOY_HELPER_CONTENT_DIR="website/output"
if ! test -d website/output
if test -f .deployment-helper
then
# shellcheck source=/dev/null
. .deployment-helper
fi
if ! test -d "${DEPLOY_HELPER_CONTENT_DIR}"
then
echo "Website-Build not found"
exit 1
@ -16,6 +25,9 @@ then
fi
lftp -e 'set sftp:auto-confirm yes; mirror -R ./website/output/ ./web/; bye' --env-password -u ${SSH_USER} sftp://${SSH_HOST}
lftp -e "set sftp:auto-confirm yes; mirror -R ${DEPLOY_HELPER_CONTENT_DIR} ./web/; bye" \
--env-password \
-u ${SSH_USER} \
sftp://${SSH_HOST}