diff --git a/.gitlab-ci.yml.example b/.gitlab-ci.yml.example new file mode 100644 index 0000000..527c5c8 --- /dev/null +++ b/.gitlab-ci.yml.example @@ -0,0 +1,16 @@ +variables: + HOST: ftp.host + USER: ftp.username + PASSWD: ftp.passoword + LOCAL_DIR: local/dir + REMOTE_DIR: remote/dir +stages: + - build +cache: + key: ${CI_BUILD_REF_NAME} + paths: + - path/cache +build_production: + stage: build + script: + - bash ./scripts/lftp.sh ${HOST} ${USER} ${PASSWD} ${LOCAL_DIR} ${REMOTE_DIR} diff --git a/lftp.sh b/lftp.sh index 1a6e4cc..c300ed7 100644 --- a/lftp.sh +++ b/lftp.sh @@ -7,11 +7,11 @@ user=$2 #ftp密码 password=$3 #要上传的文件夹 -updir=$4 +localdir=$4 #目标文件夹 -todir=$5 +remotedir=$5 lftp -u $user,$password $host<