ci: Gitea Actions 자동배포 워크플로우 구성 (#12)
- .gitea/workflows/deploy.yml: main 브랜치 push 시 빌드 + 배포 - Maven 빌드 (Frontend 포함) + JAR 배포 경로: /deploy/snp-sync-batch/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
부모
88a8e9c8a9
커밋
ccc5ae5467
49
.gitea/workflows/deploy.yml
Normal file
49
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
name: Build and Deploy SNP Sync 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'
|
||||||
|
<settings>
|
||||||
|
<mirrors>
|
||||||
|
<mirror>
|
||||||
|
<id>nexus</id>
|
||||||
|
<mirrorOf>*</mirrorOf>
|
||||||
|
<url>https://nexus.gc-si.dev/repository/maven-public/</url>
|
||||||
|
</mirror>
|
||||||
|
</mirrors>
|
||||||
|
<servers>
|
||||||
|
<server>
|
||||||
|
<id>nexus</id>
|
||||||
|
<username>${{ secrets.NEXUS_USERNAME }}</username>
|
||||||
|
<password>${{ secrets.NEXUS_PASSWORD }}</password>
|
||||||
|
</server>
|
||||||
|
</servers>
|
||||||
|
</settings>
|
||||||
|
SETTINGS
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: mvn clean package -DskipTests -B
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
cp target/snp-sync-batch-*.jar /deploy/snp-sync-batch/app.jar
|
||||||
|
date '+%Y-%m-%d %H:%M:%S' > /deploy/snp-sync-batch/.deploy-trigger
|
||||||
|
echo "Deployed at $(cat /deploy/snp-sync-batch/.deploy-trigger)"
|
||||||
|
ls -la /deploy/snp-sync-batch/
|
||||||
불러오는 중...
Reference in New Issue
Block a user