feat: Add Gitea workflow for SSH blue-green deployment and update PM2 config for Next.js standalone output.
Deploy Next.js via SSH / deploy (push) Successful in 8s
Details
Deploy Next.js via SSH / deploy (push) Successful in 8s
Details
This commit is contained in:
parent
c8bffb7f05
commit
36226cbd4a
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
username: juru
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
RELEASE_NAME=commit-${GITHUB_SHA::7}
|
||||
RELEASE_NAME=release-$(date +%Y%m%d%H%M%S)
|
||||
RELEASE_PATH=/home/juru/apps/releases/$RELEASE_NAME
|
||||
|
||||
git clone http://10.1.1.124:3000/joelson/Portal-dias-rota.git $RELEASE_PATH
|
||||
|
|
@ -23,6 +23,9 @@ jobs:
|
|||
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
cp -r public .next/standalone/
|
||||
cp -r .next/static .next/standalone/.next/
|
||||
|
||||
ln -sfn $RELEASE_PATH /home/juru/apps/current
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
module.exports = {
|
||||
apps: [{
|
||||
name: "portal-dias-rota",
|
||||
script: "npm",
|
||||
args: "start",
|
||||
cwd: "/home/juru/Portal-dias-rota",
|
||||
script: "server.js",
|
||||
cwd: "/home/juru/apps/current/.next/standalone",
|
||||
env: {
|
||||
NODE_ENV: "production",
|
||||
PORT: 3003,
|
||||
PORT: 3003,
|
||||
HOSTNAME: "0.0.0.0"
|
||||
}
|
||||
}]
|
||||
}
|
||||
Loading…
Reference in New Issue