我有一个可能有点傻的问题,我正在尝试使用 codeship 部署一个静态站点,但我无法理解文档:
https://codeship.com/documentation/continuous-deployment/deployment-to-aws-codedeploy/
目前设置方式略有不同 ,我不知道在“本地路径”输入中写什么
最佳答案
您应该将“本地路径”解释为对虚拟机中工作目录的引用。
我花了一段时间才弄明白。您可以在克隆步骤中看到这一点。你会看到这样的事情。
克隆进'/home/rof/src/bitbucket.org/<your_user>/<you_repository>'
路径 /home/rof/src/bitbucket.org/<your_user>/<you_repository>
就是你要找的。
如果您想上传该目录中的内容,只需连接其余部分,如 /home/rof/src/bitbucket.org/<your_user>/<you_repository>/internal/path
例如:
你可以编译你的 NodeJs App 并压缩 dist
目录以构建工件,然后将其上传到 S3。
它会是这样的。在您的设置命令中:
nvm use 5.6.0
npm install
npm run deploy
tar -zcvf artifact.tar.gz dist/
mkdir upload/
mv artifact.tar.gz upload/
最后你的“本地路径”是:
/home/rof/src/bitbucket.org/<your_user>/<you_repository>/upload
希望这有帮助!。
关于amazon-web-services - 如何从 Codeship 部署到 AWS S3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35347722/