This commit is contained in:
28
.gitea/workflows/deploy.yml
Normal file
28
.gitea/workflows/deploy.yml
Normal 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
1
.gitignore
vendored
@@ -46,3 +46,4 @@ next-env.d.ts
|
||||
/prisma/prisma/dev.db
|
||||
|
||||
*.ignore
|
||||
/logs
|
||||
|
||||
18
ecosystem.config.js
Normal file
18
ecosystem.config.js
Normal 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,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user