Merge pull request #132 from mash-up-kr/jm/add-reword-complete-pick #119
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: CD | |
on: | |
push: | |
branches: | |
- release/** | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: 소스 코드 다운로드 | |
uses: actions/checkout@v3 | |
- name: JDK 다운로드 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 21 | |
- name: 빌드 캐싱 | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: 현재 시간 가져오기 | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYY-MM-DDTHH-mm-ss | |
utcOffset: "+09:00" | |
- name: 빌드 | |
run: chmod +x gradlew && ./gradlew bootJar | |
- name: 배포 압축 파일 생성 | |
run: | | |
sed -i 's/{JASYPT_SECRET}/${{ secrets.JASYPT_ENCRYPTOR_PASSWORD }}/' ./deploy/Procfile | |
cp ./api/build/libs/api-1.0.0.jar ./deploy/application.jar | |
cd deploy && zip -r deploy.zip . | |
- name: 배포 | |
uses: einaregilsson/beanstalk-deploy@v22 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }} | |
aws_secret_key: ${{ secrets.AWS_SECRET_KEY }} | |
application_name: dojo-backend-eb-app | |
environment_name: dojo-backend-eb-env | |
version_label: dojo-${{ vars.GITHUB_SHA }}-${{steps.current-time.outputs.formattedTime}} | |
region: ap-northeast-2 | |
deployment_package: ./deploy/deploy.zip | |
wait_for_deployment: true |