diff --git a/.gitea/worflows/deploy.yaml b/.gitea/worflows/deploy.yaml new file mode 100644 index 0000000..af78900 --- /dev/null +++ b/.gitea/worflows/deploy.yaml @@ -0,0 +1,27 @@ +name: Deploy Automático +on: + push: + branches: [ main ] # Dispara o deploy sempre que houver push na main + workflow_dispatch: + inputs: + commit: + description: 'Commit hash para Rollback (vazio = HEAD da main)' + default: '' + + +jobs: + job_deploy: + runs-on: ubuntu-latest # Deve coincidir com a label no seu config.yaml + steps: + - name: Checkout do código + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Checkout commit específico (se fornecido) + run: | + COMMIT="${{ github.event.inputs.commit }}" + if [ -n "$COMMIT" ]; then + git checkout "$COMMIT" + fi + \ No newline at end of file