feat: GitHub Actions 자동 배포 설정 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
이희원 2026-06-20 03:54:29 +09:00
parent fc7f1826f9
commit 6a0f17d1e0
2 changed files with 37 additions and 1 deletions

36
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Deploy to Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy via SCP
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: dist/*
target: /var/www/proto.bodalab.diffthink.kr/
strip_components: 1

View File

@ -3,7 +3,7 @@ import viteImagemin from 'vite-plugin-imagemin'
export default defineConfig({ export default defineConfig({
root: 'src', root: 'src',
base: './', base: process.env.NODE_ENV === 'production' ? '/project-bodalab/' : './',
build: { build: {
outDir: '../dist', outDir: '../dist',
emptyOutDir: true, emptyOutDir: true,