feat: Add 'dias-rota' calendar page for delivery management and Gitea Actions deployment workflow.
Deploy Next.js via SSH (Direto) / deploy (push) Successful in 10s
Details
Deploy Next.js via SSH (Direto) / deploy (push) Successful in 10s
Details
This commit is contained in:
parent
02f62fc3ea
commit
15b6929190
|
|
@ -1,4 +1,4 @@
|
||||||
name: Deploy Next.js via SSH
|
name: Deploy Next.js via SSH (Direto)
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -7,32 +7,31 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Blue-Green
|
- name: Update and Restart Server
|
||||||
uses: appleboy/ssh-action@master
|
uses: appleboy/ssh-action@master
|
||||||
with:
|
with:
|
||||||
host: 10.1.1.124
|
host: 10.1.1.124
|
||||||
username: juru
|
username: juru
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
script: |
|
script: |
|
||||||
RELEASE_NAME=release-$(date +%Y%m%d%H%M%S)
|
APP_PATH=/home/juru/apps/portal-dias-rota
|
||||||
RELEASE_PATH=/home/juru/apps/releases/$RELEASE_NAME
|
|
||||||
|
|
||||||
git clone http://10.1.1.124:3000/joelson/Portal-dias-rota.git $RELEASE_PATH
|
if [ ! -d "$APP_PATH" ]; then
|
||||||
|
git clone http://10.1.1.124:3000/joelson/Portal-dias-rota.git $APP_PATH
|
||||||
cd $RELEASE_PATH
|
fi
|
||||||
|
|
||||||
|
cd $APP_PATH
|
||||||
|
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
cp /home/juru/apps/.env .env
|
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
cp -r public .next/standalone/
|
if [ -d ".next/standalone" ]; then
|
||||||
cp -r .next/static .next/standalone/.next/
|
cp -r public .next/standalone/
|
||||||
|
cp -r .next/static .next/standalone/.next/
|
||||||
|
fi
|
||||||
|
|
||||||
ln -sfn $RELEASE_PATH /home/juru/apps/current
|
pm2 reload portal-dias-rota || pm2 start npm --name "portal-dias-rota" -- start
|
||||||
|
|
||||||
pm2 reload portal-dias-rota || pm2 start /home/juru/apps/current/ecosystem.config.js
|
|
||||||
|
|
||||||
pm2 save
|
pm2 save
|
||||||
|
|
||||||
ls -dt /home/juru/apps/releases/* | tail -n +5 | xargs rm -rf
|
|
||||||
|
|
@ -237,7 +237,7 @@ const Pagina = ({ bladinhoData }: PaginaProps) => {
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row gap-2 items-center">
|
<div className="flex flex-row gap-2 items-center">
|
||||||
<Label className="text-sm min-w-32">Dias úteisss</Label>
|
<Label className="text-sm min-w-32">Dias úteis</Label>
|
||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
value={diasBaldinho}
|
value={diasBaldinho}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue