-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,918 additions
and
1,884 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# 워크플로우의 이름 지정 | ||
name: CI/CD | ||
#워크플로가 시작될 조건 지정 | ||
on: | ||
push: | ||
branches: [ feature/#배포시도 ] | ||
jobs: | ||
build: | ||
# 실행 환경 지정 | ||
runs-on: ubuntu-latest | ||
# 실행 스텝 지정 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
||
- run: touch ./src/main/resources/application.properties | ||
- run: echo "${{MALLANG_APPLICATION}}" > ./src/main/resources/application.properties | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: application.properties | ||
path: ./src/main/resources/application.properties | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean build | ||
|
||
# 현재 시간 가져오기 | ||
- name: Get current time | ||
uses: josStorer/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYY-MM-DDTHH-mm-ss | ||
utcOffset: "+09:00" | ||
|
||
# 배포용 패키지 경로 저장 | ||
- name: Set artifact | ||
run: echo "artifact=$(ls ./build/libs)" >> $GITHUB_ENV | ||
|
||
# 빈스토크 배포 (이름, 환경설정 바꾸기) | ||
- name: Beanstalk Deploy | ||
uses: einaregilsson/beanstalk-deploy@v20 | ||
with: | ||
aws_access_key: ${{MALLANG_ACCESS_KEY}} | ||
aws_secret_key: ${{MALLANG_SECRET_KEY}} | ||
application_name: Mallangs-two-web | ||
environment_name: Mallangs-two-web-env | ||
version_label: github-action-${{steps.current-time.outputs.formattedTime}} | ||
region: ap-northeast-2 | ||
deployment_package: ./build/libs/${{env.artifact}} |
Oops, something went wrong.