diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..d84f4d5 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: Build and Deploy + +on: + push: + branches: + - main + +jobs: + deploy-front: + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install front dependencies + run: cd front && npm ci + + - name: Build front + run: cd front && npm run build + + - name: Deploy front + run: rsync -a --delete front/dist/ /home/hyoseung/coupon/dist/ + + deploy-back: + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install back dependencies + run: cd back && npm ci + + - name: Build back + run: cd back && npm run build + + - name: Deploy back + run: | + rsync -a --delete back/dist/ /home/hyoseung/coupon/back/dist/ + cd /home/hyoseung/coupon/back + pm2 restart coupon-back || pm2 start ecosystem.config.js + pm2 save diff --git a/front/src/components/CouponInput.vue b/front/src/components/CouponInput.vue index 6e40f5e..8a61d9a 100644 --- a/front/src/components/CouponInput.vue +++ b/front/src/components/CouponInput.vue @@ -32,21 +32,22 @@ const successCount = computed(() => store.results.filter((r) => r.status === 'su diff --git a/front/src/components/CouponManager.vue b/front/src/components/CouponManager.vue index cb65cbb..41a55bd 100644 --- a/front/src/components/CouponManager.vue +++ b/front/src/components/CouponManager.vue @@ -50,20 +50,20 @@ async function add() { diff --git a/front/src/components/HistoryList.vue b/front/src/components/HistoryList.vue index 4a93513..48ac504 100644 --- a/front/src/components/HistoryList.vue +++ b/front/src/components/HistoryList.vue @@ -50,7 +50,7 @@ function formatDate(dt: string) { } .history-header h3 { margin: 0; - color: #f1f5f9; + color: #1e293b; font-size: 1rem; } .count { @@ -66,16 +66,17 @@ function formatDate(dt: string) { padding-right: 4px; } .list::-webkit-scrollbar { width: 4px; } -.list::-webkit-scrollbar-track { background: #0f172a; } -.list::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; } +.list::-webkit-scrollbar-track { background: #f1f5f9; } +.list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; } .item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; - background: #0f172a; + background: #f8fafc; + border: 1px solid #e2e8f0; border-radius: 8px; - border-left: 3px solid #334155; + border-left: 3px solid #e2e8f0; } .item.success { border-left-color: #22c55e; } .item.error { border-left-color: #ef4444; } @@ -86,11 +87,11 @@ function formatDate(dt: string) { } .code { font-family: monospace; - color: #cbd5e1; + color: #334155; font-size: 0.9rem; } .time { - color: #475569; + color: #94a3b8; font-size: 0.75rem; } .badge { @@ -100,6 +101,6 @@ function formatDate(dt: string) { font-weight: 600; white-space: nowrap; } -.badge.success { background: #166534; color: #4ade80; } -.badge.error { background: #7f1d1d; color: #f87171; } +.badge.success { background: #dcfce7; color: #16a34a; } +.badge.error { background: #fee2e2; color: #dc2626; }