01.上传自动化
1. 通过bash脚本来上传
# Deploy ./src/client to /1panel/apps/openresty/openresty/www/sites/web-rtc.debug.wuchuheng.com/index on the server via sftp.
LOCAL_PATH="<local path, like: /local/path>"
REMOTE_PATH="<remote target path, like: /remote/path/>"
USER=<user name>
HOST=<host name>
PRIVATE_KEY=<private key path like: ~/.ssh/id_rsa >
sftp -i ${PRIVATE_KEY} $USER@$HOST <<EOF
lcd ${LOCAL_PATH}
put -r ./ ${REMOTE_PATH}
EOF