From e98efbd6e07670dd907819ebc847852d7836cbf8 Mon Sep 17 00:00:00 2001 From: htlee Date: Sat, 14 Feb 2026 20:15:08 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20CI/CD=20=EC=9E=90=EB=8F=99=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .gitea/workflows/deploy.yml: main 머지 시 Maven 빌드 + JAR 배포 - container: maven:3.9-eclipse-temurin-17 이미지 사용 - Nexus Maven 프록시 설정 포함 Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/deploy.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..f0f0fe4 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,46 @@ +name: Build and Deploy API + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + container: + image: maven:3.9-eclipse-temurin-17 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure Maven settings + run: | + mkdir -p ~/.m2 + cat > ~/.m2/settings.xml << 'SETTINGS' + + + + nexus + * + https://nexus.gc-si.dev/repository/maven-public/ + + + + + nexus + ${{ secrets.NEXUS_USERNAME }} + ${{ secrets.NEXUS_PASSWORD }} + + + + SETTINGS + + - name: Build + run: mvn clean package -DskipTests -B + + - name: Deploy to server + run: | + cp target/gc-guide-api-*.jar /deploy/api/app.jar + echo "Deployed at $(date '+%Y-%m-%d %H:%M:%S')" + ls -la /deploy/api/