docker - 如何在 gitlab ci 上部署 quasar - vue 应用程序
问题描述
我有一个使用 $ quasar create 创建的基本类星体页面。我想在 Gitlab ci 上部署应用程序,但部署不断给我错误,我已设法修复构建和测试错误,但无法弄清楚它的部署部分。
.gitlab-ci.yml
build site:
image: node:10
stage: build
script:
- npm install -g @quasar/cli
- npm install --progress=false
- quasar build
artifacts:
expire_in: 1 week
paths:
- dist
unit test:
image: node:10
stage: test
script:
- npm install --progress=false
deploy:
image: alpine
stage: deploy
script:
- apk add --no-cache rsync openssh
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_dsa
- chmod 600 ~/.ssh/id_dsa
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- rsync -rav --delete dist/ user@server.com:/your/project/path/
解决方案
尝试使用 ssh verbose active 进行 rsync,以查看有关该错误的更多信息:
rsync -av -e "ssh -vv" --delete ...
检查您的 ssh 元素的权限。
例如:
chmod 700 ~/.ssh
推荐阅读
- html - 浏览器显示文本但文本不在 HTML 代码中
- javascript - 如何使用 Ramda 通过 id 查找和注入外来对象?
- c# - Visual Studio 不会从我的 nupkg 中读取 .pdb
- bash - 检查具有可变编号的字符串的出现
- android - 当活动改变状态时如何从变量中恢复内容?
- python - 按时间戳列过滤 Pyspark DataFrame 问题(IndexError:列表索引超出范围)
- php - 如果子表> 0,Laravel 会阻止删除
- rest - 版本方法的 O365 REST API 错误响应
- c++ - 如何在 C++ 中修复 SFML“无法加载图像”?(垃圾字符)(解决)
- python - 在 numpy 矩阵上应用自定义函数