From 70f41f136a8ca3fb0b348ea4a37ad33c4c8de7e9 Mon Sep 17 00:00:00 2001 From: HYOJIN Date: Tue, 24 Mar 2026 14:30:01 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20Gitea=20Actions=20=EC=9E=90=EB=8F=99?= =?UTF-8?q?=EB=B0=B0=ED=8F=AC=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C?= =?UTF-8?q?=EC=9A=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - main 브랜치 push 시 빌드 및 /deploy/snp-batch/ 배포 - gc-guide-api CI/CD 구성 참조 --- .gitea/workflows/deploy.yml | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 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..0c8f923 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,49 @@ +name: Build and Deploy Batch + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + container: + image: maven:3.9-eclipse-temurin-17 + steps: + - name: Checkout + run: | + git clone --depth=1 --branch=${GITHUB_REF_NAME} \ + http://gitea:3000/${GITHUB_REPOSITORY}.git . + + - 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 + run: | + cp target/snp-batch-validation-*.jar /deploy/snp-batch/app.jar + date '+%Y-%m-%d %H:%M:%S' > /deploy/snp-batch/.deploy-trigger + echo "Deployed at $(cat /deploy/snp-batch/.deploy-trigger)" + ls -la /deploy/snp-batch/