Update README with application.yml setup instructions #40
This file contains hidden or 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: Deploy EverTale_BE | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ develop ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1. 코드 체크아웃 | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| # 2. JDK 17 설정 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'adopt' | |
| java-version: '17' | |
| # 3. application.yml 생성 | |
| - name: Make application.yml | |
| run: | | |
| mkdir -p ./src/main/resources | |
| echo "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application.yml | |
| shell: bash | |
| # 4. Gradle 빌드 | |
| - name: Build with Gradle | |
| run: | | |
| chmod +x ./gradlew | |
| ./gradlew clean build -x test | |
| # 5. Docker 이미지 빌드 및 Docker Hub 푸시 | |
| - name: Docker build & push | |
| run: | | |
| echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
| docker build -t ${{ secrets.DOCKER_REPO }}:latest . | |
| docker push ${{ secrets.DOCKER_REPO }}:latest | |
| sudo docker image prune -f | |
| # 6. Infra 워크플로 트리거 | |
| # - name: Trigger EverTale-infra workflow | |
| # uses: peter-evans/repository-dispatch@v3 | |
| # with: | |
| # token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
| # repository: DropThe8bit/EverTale-infra | |
| # event-type: trigger-from-be |