-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…-cicd-swagger-설정 feat: cicd swagger 설정
- Loading branch information
Showing
24 changed files
with
532 additions
and
514 deletions.
There are no files selected for viewing
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,64 @@ | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
||
# application.yml 파일 생성 | ||
- run: touch ./src/main/resources/application.yml | ||
- run: echo "${{ secrets.APPLICATION }}" > ./src/main/resources/application.yml | ||
|
||
# application-secret.yml 파일 생성 | ||
- run: touch ./src/main/resources/application-secret.yml | ||
- run: echo "${{ secrets.APPLICATION_SECRET }}" > ./src/main/resources/application-secret.yml | ||
|
||
# 생성된 파일들을 아티팩트로 업로드 | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: application-files | ||
path: | | ||
./src/main/resources/application.yml | ||
./src/main/resources/application-secret.yml | ||
- 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 path | ||
run: | | ||
artifact=$(ls ./build/libs/*.jar | head -n 1) | ||
echo "artifact=$artifact" >> $GITHUB_ENV | ||
# 빈스토크 배포 | ||
- name: Deploy to Elastic Beanstalk | ||
uses: einaregilsson/beanstalk-deploy@v20 | ||
with: | ||
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
application_name: flowday | ||
environment_name: Flowday-env | ||
version_label: github-action-${{ steps.current-time.outputs.time }} | ||
region: ap-northeast-2 | ||
deployment_package: ${{ env.artifact }} |
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
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
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
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
29 changes: 11 additions & 18 deletions
29
src/main/java/org/example/flowday/domain/course/vote/controller/VoteController.java
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
Oops, something went wrong.