feat: add manual rollback Gitea workflow.
Deploy Next.js via SSH / deploy (push) Successful in 24s Details

This commit is contained in:
JuruSysadmin 2026-01-07 15:20:08 -03:00
parent c7b8bc7357
commit b953113f3c
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
name: Manual Rollback
on:
workflow_dispatch: # Permite rodar manualmente pela interface do Gitea
inputs:
commit_hash:
description: 'Hash do commit para retornar'
required: true
jobs:
rollback:
runs-on: ubuntu-latest
steps:
- name: Execute Rollback via SSH
uses: appleboy/ssh-action@master
with:
host: 10.1.1.124
username: juru
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/juru/Portal-dias-rota
git fetch origin
git reset --hard ${{ github.event.inputs.commit_hash }}
npm install --production
npm run build
pm2 reload portal-dias-rota