chore: devlop ci시에 yml 파일 가져오게 수정 #6
Workflow file for this run
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: Build and Deploy to EC2 | |
on: | |
push: | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
workflow_dispatch: | |
env: | |
BUCKET_NAME: team09-cicd-bucket | |
PROJECT_NAME: studay | |
DEPLOYMENT_GROUP_NAME: studay_cicd | |
CODE_DEPLOY_APP_NAME: studay_cicd | |
jobs: | |
# 작업의 이름 | |
build_and_test: | |
# GitHub Actions 러너의 운영 체제 | |
runs-on: ubuntu-latest | |
# 순차적으로 실행될 단계들을 정의하는 섹션 | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Create application.yml | |
run: | | |
echo "${{ secrets.APPLICATION_YML_CONTENT }}" > src/main/resources/application.yml | |
echo "${{ secrets.APPLICATION_YML_CONTENT }}" > src/main/resources/application-dev.yml | |
echo "${{ secrets.APPLICATION_YML_CONTENT }}" > src/main/resources/application-oauth.yml | |
- name: Build with gradle | |
run: ./gradlew build | |