- .gitea/workflows/deploy.yml: main 머지 시 자동 빌드+배포 - CiCdGuide.tsx: CI/CD 가이드 페이지 (워크플로우 작성법, 시크릿, 트러블슈팅) - navigation.ts, GuidePage.tsx: CI/CD 메뉴 항목 + 라우트 등록 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
844 B
YAML
37 lines
844 B
YAML
name: Build and Deploy
|
|
|
|
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: '20'
|
|
|
|
- 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
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Deploy to server
|
|
run: |
|
|
rm -rf /deploy/guide/*
|
|
cp -r dist/* /deploy/guide/
|
|
echo "Deployed at $(date '+%Y-%m-%d %H:%M:%S')"
|
|
ls -la /deploy/guide/
|