ci: Gitea Actions CI/CD 워크플로 추가
This commit is contained in:
@@ -0,0 +1,40 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, dev]
|
||||||
|
pull_request:
|
||||||
|
branches: [main, dev]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
# 린트는 결과만 보고하고 빌드를 막지 않음 (--fix 없이 검사만)
|
||||||
|
- name: Lint (report only)
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
npx oxlint .
|
||||||
|
npx eslint .
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Upload build output
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist
|
||||||
|
retention-days: 7
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
name: Deploy (manual)
|
||||||
|
|
||||||
|
# 배포 대상이 정해지면 아래 단계의 주석을 풀고 시크릿을 등록하세요.
|
||||||
|
# 저장소 Settings > Actions > Secrets 에 등록 필요:
|
||||||
|
# DEPLOY_HOST, DEPLOY_USER, DEPLOY_SSH_KEY, DEPLOY_PATH
|
||||||
|
on:
|
||||||
|
workflow_dispatch: {}
|
||||||
|
# push:
|
||||||
|
# tags: ['v*']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# ===== 배포 예시 (택1) — 사용 시 주석 해제 =====
|
||||||
|
# 1) 정적 파일을 원격 서버로 rsync (Nginx 등 정적 호스팅)
|
||||||
|
# - name: Deploy via SSH/rsync
|
||||||
|
# uses: appleboy/scp-action@v0.1.7
|
||||||
|
# with:
|
||||||
|
# host: ${{ secrets.DEPLOY_HOST }}
|
||||||
|
# username: ${{ secrets.DEPLOY_USER }}
|
||||||
|
# key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
|
# source: "dist/*"
|
||||||
|
# target: ${{ secrets.DEPLOY_PATH }}
|
||||||
|
# strip_components: 1
|
||||||
|
|
||||||
|
- name: Notice
|
||||||
|
run: echo "dist 빌드 완료. 배포 대상 지정 후 위 단계를 활성화하세요."
|
||||||
Reference in New Issue
Block a user