25 lines
717 B
YAML
25 lines
717 B
YAML
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 |