我有一个Angular应用程序,需要使用GitHub Actions将其部署到Elastic Beanstalk。我正在关注这个guideline,以便按应用程序部署到ELB。
我遇到错误:
未提供文件名,将部署现有版本1
- [错误]部署失败:TypeError [ERR_INVALID_ARG_TYPE]:“数据”参数必须是字符串,缓冲区,TypedArray或以下类型之一 数据视图。收到的类型未定义
- [错误]节点运行失败,退出代码为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
请让我知道,我做错了什么,或者我错过了什么?
答案 0 :(得分:1)
GitHub市场指南中有一个错字。在该代码段中,提及AWS区域的键是aws_region
,这是错误的。密钥应改为region
。
- 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