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