From 6a0f17d1e06cf64e0b7f359acbca31e5f1a352e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=9D=AC=EC=9B=90?= Date: Sat, 20 Jun 2026 03:54:29 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20GitHub=20Actions=20=EC=9E=90=EB=8F=99?= =?UTF-8?q?=20=EB=B0=B0=ED=8F=AC=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ vite.config.js | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9ef5d13 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/vite.config.js b/vite.config.js index 31b6660..97a2bd1 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,7 +3,7 @@ import viteImagemin from 'vite-plugin-imagemin' export default defineConfig({ root: 'src', - base: './', + base: process.env.NODE_ENV === 'production' ? '/project-bodalab/' : './', build: { outDir: '../dist', emptyOutDir: true,