Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwhi09 committed Aug 26, 2024
2 parents 0321a45 + e0e5f0f commit 6ea3334
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/main_onna.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and deploy JAR app to Azure Web App - onna

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
# 리포지토리의 코드를 체크아웃합니다.
- uses: actions/checkout@v4

# Java 17 버전을 설치하고 설정합니다.
- name: Set up Java version
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'microsoft'

# Gradle을 사용하여 onna-server 디렉토리에서 빌드를 수행합니다.
- name: Build with Gradle
run: |
cd onna-server
./gradlew build
continue-on-error: true
# 빌드된 JAR 파일을 업로드하여 다음 배포 단계에서 사용할 수 있도록 합니다.
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: java-app
path: 'onna-server/build/libs/*.jar'

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
# 빌드 단계에서 업로드한 아티팩트를 다운로드합니다.
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: java-app

# Azure Web App에 JAR 파일을 배포합니다.
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
with:
app-name: 'onna'
slot-name: 'Production'
package: 'onna-server/build/libs/*.jar'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D04B2FA0C49A43908FE2C03A2EE374BD }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `{{ 팀 이름 }}` - `{{ 제품/서비스 이름 }}`
# 의성마늘햄 - 온나

해커그라운드 해커톤에 참여하는 `{{ 팀 이름 }}` 팀의 `{{ 제품/서비스 이름 }}`입니다.
해커그라운드 해커톤에 참여하는 `의성마늘햄` 팀의 `온나`입니다.

## 참고 문서

Expand Down

0 comments on commit 6ea3334

Please sign in to comment.