gpt4 book ai didi

reactjs - 如何使用 bitbucket 管道在 ubuntu 服务器中部署 React 应用程序

转载 作者:行者123 更新时间:2023-12-04 09:16:42 28 4
gpt4 key购买 nike

我想构建和部署我的 react app来自我的 master我已经设法自动构建但无法将其传输到我的服务器找到我的 pipeline code下面,我收到以下错误

pipelines:
default:
- step:
name: Build Title
script:
- npm install
- npm run build
- mkdir packaged
- tar -czvf packaged/package-${BITBUCKET_BUILD_NUMBER}.tar.gz -C build .
artifacts:
- packaged/**
- step:
name: Deploy to Web
image: alpine
trigger: manual
deployment: production
script:
- mkdir upload
- tar -xf packaged/package-${BITBUCKET_BUILD_NUMBER}.tar.gz -C upload
- apk update && apk add openssh rsync
- rsync -a -e "ssh -o StrictHostKeyChecking=no" --delete upload/ $USERNAME@$SERVER:html/temp/react-${BITBUCKET_BUILD_NUMBER}
- ssh -o StrictHostKeyChecking=no $USERNAME@$SERVER "rm -r html/www"
- ssh -o StrictHostKeyChecking=no $USERNAME@$SERVER "mv 'html/temp/react-${BITBUCKET_BUILD_NUMBER}' 'var/www/html/deploy'"
- ssh -o StrictHostKeyChecking=no $USERNAME@$SERVER "chmod -R u+rwX,go+rX,go-w html/www"
错误日志
+ rsync -a  -e "ssh -o StrictHostKeyChecking=no" --delete upload/ $USERNAME@$SERVER:html/temp/react-${BITBUCKET_BUILD_NUMBER}
load pubkey "/opt/atlassian/pipelines/agent/ssh/id_rsa": invalid format
rsync: mkdir "/$USERNAME/html/temp/react-15" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(675) [Receiver=3.1.2]

最佳答案

我注意到。这仅发生在基于 Alpine 的图像上。例如,Debian 镜像运行良好。它也发生在 Buddy 上,而不仅仅是在 Bitbucket 上。我希望这是上游的 Alpine 错误/问题。

关于reactjs - 如何使用 bitbucket 管道在 ubuntu 服务器中部署 React 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63186156/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com