Adicionar workflow de deploy automático
This commit is contained in:
27
.gitea/worflows/deploy.yaml
Normal file
27
.gitea/worflows/deploy.yaml
Normal file
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user