mirror of
https://github.com/SamKirkland/FTP-Deploy-Action.git
synced 2025-08-14 22:15:05 +00:00
15 lines
394 B
Bash
15 lines
394 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:-"."}
|
|
|
|
lftp $FTP_SERVER -u $FTP_USERNAME,$FTP_PASSWORD -e "set ftp:ssl-allow no; mirror $ARGS -R $WDEFAULT_LOCAL_DIR $WDEFAULT_REMOTE_DIR; quit"
|
|
|
|
echo "FTP Deploy Complete"
|
|
exit 0 |