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

This commit is contained in:
JuruSysadmin 2026-01-07 16:51:47 -03:00
parent 02f62fc3ea
commit 15b6929190
2 changed files with 17 additions and 18 deletions

View File

@ -1,4 +1,4 @@
name: Deploy Next.js via SSH
name: Deploy Next.js via SSH (Direto)
on: [push]
jobs:
@ -7,32 +7,31 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Blue-Green
- name: Update and Restart Server
uses: appleboy/ssh-action@master
with:
host: 10.1.1.124
username: juru
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
RELEASE_NAME=release-$(date +%Y%m%d%H%M%S)
RELEASE_PATH=/home/juru/apps/releases/$RELEASE_NAME
APP_PATH=/home/juru/apps/portal-dias-rota
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
fi
cd $RELEASE_PATH
cd $APP_PATH
cp /home/juru/apps/.env .env
git pull origin main
npm install
npm run build
cp -r public .next/standalone/
cp -r .next/static .next/standalone/.next/
if [ -d ".next/standalone" ]; then
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 /home/juru/apps/current/ecosystem.config.js
pm2 reload portal-dias-rota || pm2 start npm --name "portal-dias-rota" -- start
pm2 save
ls -dt /home/juru/apps/releases/* | tail -n +5 | xargs rm -rf

View File

@ -237,7 +237,7 @@ const Pagina = ({ bladinhoData }: PaginaProps) => {
</Button>
</div>
<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
type="number"
value={diasBaldinho}