8

I have an Angular application which needs to be deployed to Elastic Beanstalk using GitHub Actions. I'm following this guideline to deploy by application to ELB.

I'm getting an error:

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

Below is my main.yml file

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

Please let me know, what I'm doing wrong or if I am missing out on something?

1 Answer 1

1

There is a typo in the GitHub market place guidelines. In that code snippet, the key to mention AWS region is aws_region, which is wrong. The key should be region instead.

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
Sign up to request clarification or add additional context in comments.

3 Comments

Where in the guideline does it say "aws_region" ? As far as I can see it says "region" everywhere?
@EinarEgilsson Sorry the typo is on the GitHub market place when integrating. I'm adding a screenshot in my answer.
Thanks. It was an error in my action.yml file, fixed in version 4 now :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.