gpt4 book ai didi

github-actions - 使用 GitHub 操作将 Angular 应用程序部署到 beanstalk

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

我有一个 Angular 应用程序,需要使用 GitHub Actions 将其部署到 Elastic Beanstalk。我正在关注这个 guideline通过应用程序部署到 ELB。

我收到一个错误:

No filename given, deploying existing version 1

  • [error]Deployment failed: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be one of type string, Buffer, TypedArray, or DataView. Received type undefined
  • [error]Node run failed with exit code 2


下面是我的 main.yml文件
name: CI

on:
push:
branches:
- dry-run-actions

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]

steps:
- uses: actions/checkout@v1

# I'm removing the intermediate steps to make this code look shorter and these steps are running correctly.
# In these steps I'm "Caching node_module", "npm install" and "npm run build"

- name: Cache node modules
...
- name: Node ${{ matrix.node-version }}
...
- name: Do NPM install
...
- name: Building application
...
- name: Generate deployment package
run: zip -r deploy.zip ./dist/*

- name: Beanstalk Deploy for Climber Mentee App
uses: einaregilsson/beanstalk-deploy@v3
with:
aws_access_key: ${{secrets.AWS_ACCESS_KEY}}
aws_secret_key: ${{secrets.AWS_SECRET_KEY}}
aws_region: "ap-south-1"
application_name: "app-name"
environment_name: "aws-env-name"
version_label: 1
deployment_package: deploy.zip

- name: Deployed the test app
run: echo Yeaahhhhh

enter image description here

请让我知道,我做错了什么,或者我错过了什么?

最佳答案

GitHub 市场指南中有一个拼写错误。在该代码段中,提及 AWS 区域的关键是 aws_region ,这是错误的。 key 应该是 region反而。

enter image description here

- name: Beanstalk Deploy for Climber Mentee App
uses: einaregilsson/beanstalk-deploy@v3
with:
aws_access_key: ${{secrets.AWS_ACCESS_KEY}}
aws_secret_key: ${{secrets.AWS_SECRET_KEY}}
region: "ap-south-1" // not aws_region
application_name: "app-name"
environment_name: "aws-env-name"
version_label: 1
deployment_package: deploy.zip

关于github-actions - 使用 GitHub 操作将 Angular 应用程序部署到 beanstalk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59499899/

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