feat: Add CI/CD workflow for SSH deployment and update PM2 configuration to use `npm start` with a specified working directory.
Deploy Next.js via SSH / deploy (push) Successful in 27s
Details
Deploy Next.js via SSH / deploy (push) Successful in 27s
Details
This commit is contained in:
parent
56efe77603
commit
c7b8bc7357
|
|
@ -14,8 +14,8 @@ jobs:
|
|||
username: juru
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
cd /home/juru/portal-dias-rota
|
||||
cd /home/juru/Portal-dias-rota
|
||||
git pull origin main
|
||||
npm install
|
||||
npm install --legacy-peer-deps
|
||||
npm run build
|
||||
pm2 restart portal-dias-rota || pm2 start npm --name "portal-dias-rota" -- start
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "portal-dias-rota",
|
||||
script: ".next/standalone/server.js",
|
||||
args: "start",
|
||||
env: {
|
||||
NODE_ENV: "production",
|
||||
PORT: 3003
|
||||
}
|
||||
apps: [{
|
||||
name: "portal-dias-rota",
|
||||
script: "npm",
|
||||
args: "start",
|
||||
cwd: "/home/juru/Portal-dias-rota",
|
||||
env: {
|
||||
NODE_ENV: "production",
|
||||
PORT: 3003,
|
||||
}
|
||||
]
|
||||
};
|
||||
}]
|
||||
}
|
||||
Loading…
Reference in New Issue