【发布时间】:2020-06-30 21:42:16
【问题描述】:
所以我们正忙于一个 uni 项目,我已经使用 aws codePipeline、Github、CodeBuild 等设置了自动化部署。
我终于在构建阶段使用了我的构建规范,并且部署也成功了。但是我在访问 url 时收到错误 404 Keynotfound。
当我转到存储桶内容时,这就是我发现的。它只是类型文件的东西。角度文件不在这里。
有什么帮助吗?
这是我的构建规范代码:
phases:
install:
commands:
- echo installing nodejs...
- curl -sL https://deb.nodesource.com/setup_12.x | bash -
- apt-get install -y nodejs
- echo installing yarn...
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- apt install --no-install-recommends yarn
pre_build:
commands:
- echo installing dependencies...
- npm i -g @angular/cli
- npm install
build:
commands:
# - echo testing...
# - echo building...
- ng build --prod
artifacts:
files:
- "**/*"
discard-paths: no
base-directory: dist/ ```
【问题讨论】:
-
我在代码构建中没有看到对 s3 的任何调用?由于缺少密钥,它在哪里出错?
-
在我设置了静态网站访问的存储桶后,我转到 url 我得到 404 NotFound Code: NoSuchKey Message: The specified key does not exist.
标签: git amazon-web-services amazon-s3