From ab24ed926b2877f07cfad59775a404491d9f069f Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 30 May 2026 20:13:15 +0000 Subject: [PATCH] Adicionar .github/workflows/deploy.yml --- .github/workflows/deploy.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..7b0fef1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Deploy CI + +on: + push: + branches: [ master ] + workflow_dispatch: + +jobs: + deploy: + runs-on: deploy + container: + image: alpine:latest + + steps: + - name: Checkout + run: | + apk add --no-cache git bash + git clone http://10.11.10.71:3000/${{ gitea.repository }}.git . + git checkout ${{ gitea.sha }} + + - name: Validar scripts shell + run: | + echo "🔍 Validando sintaxe dos scripts..." + for script in scripts/*.sh; do + if [ -f "$script" ]; then + echo "✅ Validando $script..." + bash -n "$script" + fi + done + + - name: Executar verificações pós-deploy + run: | + echo "🔧 Executando verificações pós-deploy..." + chmod +x scripts/*.sh + ./scripts/ping_monitor.sh + ./scripts/ram-monitor.sh + ./scripts/disk-monitor.sh + + - name: Concluir deploy + run: echo "✅ Deploy concluído com sucesso!" \ No newline at end of file