deploysetting
Some checks failed
deploy-on-main / deploy (push) Has been cancelled

This commit is contained in:
2025-11-04 08:01:05 +00:00
parent f4e46c39fb
commit 1049d029b4
4 changed files with 48 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
name: deploy-on-main
on:
push:
branches: [ "main" ]
jobs:
deploy:
runs-on: [ linux_amd64, self-hosted ]
steps:
- uses: actions/checkout@v4
- name: Node/PM2/Prisma 확인
run: |
node -v
npm -v
pm2 -v || true
npx prisma --version || true
- name: 배포
env:
APP_DIR: /root/msgapp
run: |
set -e
cd "$APP_DIR"
git pull
npm run dbforce
npm run build
pm2 reload ecosystem.config.js --env production || (pm2 start ecosystem.config.js --env production && pm2 save)

1
.gitignore vendored
View File

@@ -46,3 +46,4 @@ next-env.d.ts
/prisma/prisma/dev.db
*.ignore
/logs

18
ecosystem.config.js Normal file
View File

@@ -0,0 +1,18 @@
module.exports = {
apps: [
{
name: 'assm',
cwd: '/root/msgapp',
script: 'npm',
args: 'start',
interpreter: 'none',
env: {
NODE_ENV: 'production',
},
autorestart: true,
watch: false,
},
],
};

View File

@@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev --turbopack",
"build": "next build --turbopack",
"start": "next start",
"start": "next start --port 3100",
"lint": "biome check",
"format": "biome format --write",
"migrate": "prisma migrate dev",