deploy to aws eb #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Elastic Beanstalk | |
on: | |
push: | |
branches: | |
- deploy-to-elastic-beanstalk | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Build Project | |
run: mvn clean install -DskipTests | |
- name: Deploy to EB | |
uses: einaregilsson/beanstalk-deploy@v21 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }} | |
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
application_name: 'Springboot-example-app' | |
environment_name: 'springboot-example-app-env' | |
version_label: ${{ github.sha }} | |
region: us-east-1 | |
deployment_package: target/springboot-example.jar |