From 820ca043f8c4d8f82efe2e69ebf61af32bb2f9be Mon Sep 17 00:00:00 2001 From: Remco <1+remco@noreply.gitlabi@epicnabbo.nl> Date: Sun, 12 Jul 2026 11:22:34 +0200 Subject: [PATCH] Update .gitea/workflows/deploy.yaml --- .gitea/workflows/deploy.yaml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index bf6311ca..017596e3 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,15 +1,35 @@ -script: | +name: Remote Build and Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Deploying via SSH to Host + uses: appleboy/ssh-action@v1.0.3 + with: + host: "5.252.100.130" + username: "root" + key: ${{ secrets.SSH_PRIVATE_KEY }} + port: 22 + script: | set -e echo "--- EPIC WEB CONTROL: Starting Auto-Cleanup & Deploy ---" + # 1. Ruim "dode" containers op docker container prune -f || true + + # 2. Navigeer naar de map cd /var/www/atom-nexst/ # Dwing Git om de lokale SSH-sleutel van de root-user op de VPS te gebruiken export GIT_SSH_COMMAND="ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no" - # Mocht je sleutel ergens anders staan (zoals /home/user/.ssh/), pas dan het pad hierboven aan. - + # 3. Deployment stappen git fetch origin --prune git reset --hard origin/main @@ -18,6 +38,7 @@ script: | /usr/local/bin/pnpm prisma generate /usr/local/bin/pnpm build + # 4. Restart service systemctl restart atom-nexst.service echo "--- Deployment succesvol voltooid ---" \ No newline at end of file