我想使用 Gitlab CI 在 master 提交时将我的静态网站部署到 ftp 服务器。我没有 DevOps 经验,并尝试通过互联网上的教程来做到这一点。我制作了这个 .gitlab-ci.yml 文件
deploy:
stage: deploy
only:
- master
deploy:
script:
- apt-get update -qq && apt-get install -y -qq lftp
- lftp -u ftp-login,ftp-pass ftp.server \
-e "mirror -e -R -x .git -x excl.txt -x exclude-1 -x exclude-2 -x README.md -p ./ mysite/www/ ; quit"
Run Code Online (Sandbox Code Playgroud)
但是 gitlab 向我显示这个 yml 文件的错误。它表示在此上下文中不允许映射值。你能帮我处理这个文件吗?谢谢!
continuous-integration yaml continuous-deployment gitlab gitlab-ci