mirror of
https://github.com/SamKirkland/FTP-Deploy-Action.git
synced 2025-08-15 06:25:05 +00:00
17 lines
430 B
Bash
17 lines
430 B
Bash
#!/bin/sh
|
|
|
|
# "to avoid continuing when errors or undefined variables are present"
|
|
set -eu
|
|
|
|
echo "Starting FTP Deploy"
|
|
echo "Uploading files..."
|
|
|
|
WDEFAULT_LOCAL_DIR=${LOCAL_DIR:-"."}
|
|
WDEFAULT_REMOTE_DIR=${REMOTE_DIR:-"."}
|
|
WDEFAULT_ARGS=${ARGS:-""}
|
|
|
|
lftp $FTP_SERVER -u $FTP_USERNAME,$FTP_PASSWORD -e "set ftp:ssl-allow no; mirror $WDEFAULT_ARGS -R $WDEFAULT_LOCAL_DIR $WDEFAULT_REMOTE_DIR; quit"
|
|
|
|
echo "FTP Deploy Complete"
|
|
exit 0
|