From 5c6b12129016856cce6cb34cffe74afd5eb6c162 Mon Sep 17 00:00:00 2001 From: Sony Surahmn Date: Wed, 29 Apr 2026 16:29:40 +0700 Subject: [PATCH] Add deployment workflow for backend in Gitea --- .gitea/workflows/deploy.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..250a21a --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy Backend + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: linux + defaults: + run: + working-directory: /home/app/saude/entity + + steps: + - name: Install SSH + run: | + if command -v apk >/dev/null; then + apk add --no-cache openssh-client + elif command -v apt-get >/dev/null; then + apt-get update && apt-get install -y openssh-client + fi + + - name: Pull latest source from main + run: | + git fetch origin + git reset --hard origin/main + + - name: Build + run: | + npm run build