Update .gitea/workflows/deploy.yaml
Remote Build and Deploy / deploy (push) Successful in 5s

This commit is contained in:
remco committed 2026-07-11 21:42:00 +02:00
1 parent 2958481016
commit 2e86b17d18
1 file changed
+30 -27
+30 -27
View File
@@ -8,30 +8,33 @@ jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Execute Build and Deploy Commands - name: Deploying via SSH connection to VPS Host
run: | uses: appleboy/[email protected]
echo "--- Starting EPIC WEB CONTROL Deployment ---" with:
host: "172.20.2.1" # The default bridge gateway IP pointing back to your VPS host
# We misbruiken de docker socket om een commando direct op de VPS host uit te voeren username: "root" # Replace with your actual VPS SSH username if not running as root
# Dit lost alle problemen op met ontbrekende mappen, pnpm, of sudo-rechten! key: ${{ secrets.SSH_PRIVATE_KEY }}
docker run --rm \ port: 22
-v /var/www/atom-next:/app \ script: |
-v /var/run/docker.sock:/var/run/docker.sock \ echo "--- Starting EPIC WEB CONTROL Deployment ---"
--pid=host \
node:20-bullseye \ # 1. Navigate to your project directory on the bare metal VPS
bash -c " cd /var/www/atom-next/
cd /app &&
git fetch --all && # 2. Synchronize the application files via Git
git reset --hard origin/main && git fetch --all
echo '--- Running Database Migrations ---' && git reset --hard origin/main
npm install -g pnpm &&
pnpm db:migrate && # 3. Run database migrations natively
echo '--- Building Application ---' && echo "--- Running Database Migrations ---"
pnpm build pnpm db:migrate
"
# 4. Compile the updated distribution assets
# Herstart de service op de host via een tijdelijke container met host-rechten echo "--- Building Application ---"
echo "--- Restarting Atom Next Service ---" pnpm build
docker run --rm --pid=host --privileged alpine proto-systemctl restart atom-next.service || true
# 5. Restart the host background service cleanly
echo "--- Deployment Completed Successfully ---" echo "--- Restarting Atom Next Service ---"
sudo systemctl restart atom-next.service
echo "--- Deployment Completed Successfully ---"