I am trying to upload my code to AWS Elastic Beanstalk by zipping the folder and uploading it and this fails to deploy and always becomes severe but if I manually zip the same folder and the same file it works and is deployed.
main.yml
name: Test & Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Latest Repo
uses: actions/checkout@main
- name: Zip Project
run: zip -r deploy.zip *
- name: Get timestamp
uses: gerred/actions/current-time@master
id: current-time
- name: Run string replace
uses: frabert/replace-string-action@master
id: format-time
with:
pattern: '[:\.]+'
string: "${{ steps.current-time.outputs.time }}"
replace-with: '-'
flags: 'g'
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v20
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: WebsiteDocker
environment_name: Websitedocker-env
version_label: "deployment-${{ steps.format-time.outputs.replaced }}"
region: eu-west-1
deployment_package: deploy.zip
This is the main.yml file responsible for uploading the files as a .zip.