This commit is contained in:
@@ -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!"
|
||||||
Reference in New Issue
Block a user