Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Add awsdeployment.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
WiolaWysopal committed Mar 2, 2024
1 parent 8d0474d commit 112963d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/awsdeployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy to AWS Elastic Beanstalk

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

- name: Generate deployment package
run: zip -r package.zip . -x '*.git*'

- name: Deploy to AWS Elastic Beanstalk
uses: einaregilsson/beanstalk-deploy@v18
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: 'GitHubActionsApp'
environment_name: 'GitHubActionsApp-env'
region: 'eu-central-1'
version_label: ${{ github.sha }}
deployment_package: 'package.zip'

0 comments on commit 112963d

Please sign in to comment.