feat: add manual rollback Gitea workflow.
Deploy Next.js via SSH / deploy (push) Successful in 24s
Details
Deploy Next.js via SSH / deploy (push) Successful in 24s
Details
This commit is contained in:
parent
c7b8bc7357
commit
b953113f3c
|
|
@ -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
|
||||
Loading…
Reference in New Issue