Merge pull request 'ci: Gitea Actions 자동배포 워크플로우 추가' (#1) from feature/add-cicd into develop

This commit is contained in:
htlee 2026-04-06 14:13:24 +09:00
커밋 7a9ece5f0f

파일 보기

@ -0,0 +1,37 @@
name: Build and Deploy KCG AI Monitoring
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Configure npm registry
run: |
echo "registry=https://nexus.gc-si.dev/repository/npm-public/" > .npmrc
echo "//nexus.gc-si.dev/repository/npm-public/:_auth=${{ secrets.NEXUS_NPM_AUTH }}" >> .npmrc
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Build
run: npm run build
- name: Deploy to server
run: |
mkdir -p /deploy/kcg-ai-monitoring
rm -rf /deploy/kcg-ai-monitoring/*
cp -r dist/* /deploy/kcg-ai-monitoring/
echo "Deployed at $(date '+%Y-%m-%d %H:%M:%S')"
ls -la /deploy/kcg-ai-monitoring/