From e4a736fc59df1d9f2839912a1f719c5196f3911b Mon Sep 17 00:00:00 2001 From: Rafael Lopes Date: Mon, 4 May 2026 09:06:34 -0300 Subject: [PATCH] =?UTF-8?q?CI/CD:=20Adicionado=20o=20workflow=20de=20deplo?= =?UTF-8?q?y=20para=20produ=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy-prod.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/deploy-prod.yaml diff --git a/.gitea/workflows/deploy-prod.yaml b/.gitea/workflows/deploy-prod.yaml new file mode 100644 index 0000000..bb81687 --- /dev/null +++ b/.gitea/workflows/deploy-prod.yaml @@ -0,0 +1,26 @@ +name: Deploy Production + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: vm-prod + + steps: + - name: Deploy application + run: | + set -euo pipefail + + cd /opt/HUBXGLPI + + git fetch origin main + git checkout main + git pull --ff-only origin main + + npm ci --omit=dev + + pm2 reload ecosystem.config.js --env production || pm2 start ecosystem.config.js --env production + pm2 save