Skip to content

Commit

Permalink
#3 feat: elastic beanstalk 환경 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
yo0oni committed Jan 11, 2024
1 parent 4369f60 commit 8181cb5
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
character set server: 'utf8'
mysql database: 'trip'
mysql user: 'hdy'
mysql user: 'kjy'
mysql password: ${{ secrets.MYSQL_PASSWORD }}

- name: Grant execute permission for gradlew
Expand All @@ -38,4 +38,31 @@ jobs:

- name: Build with Gradle
run: ./gradlew clean build
shell: bash
shell: bash

- name: Get current time
uses: 1466587594/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"

- name: Generate deployment package
run: |
mkdir -p deploy
cp build/libs/*.jar deploy/application.jar
cp Procfile deploy/Procfile
cp -r .ebextensions deploy/.ebextensions
cp -r .platform deploy/.platform
cd deploy && zip -r deploy.zip .
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: how-about-trip
environment_name: How-about-trip-env
version_label: github-action-${{steps.current-time.outputs.formattedTime}}
region: ap-northeast-2
deployment_package: deploy/deploy.zip

0 comments on commit 8181cb5

Please sign in to comment.