Update .gitea/workflows/deploy.yaml
Remote Build and Deploy / deploy (push) Failing after 1s

This commit is contained in:
remco committed 2026-07-11 21:38:51 +02:00
1 parent 09654fd5a8
commit 2958481016
1 file changed
+19 -16
+19 -16
View File
@@ -6,29 +6,32 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: shell runs-on: ubuntu-latest
steps: steps:
- name: Execute Build and Deploy Commands - name: Execute Build and Deploy Commands
run: | run: |
echo "--- Starting EPIC WEB CONTROL Deployment ---" echo "--- Starting EPIC WEB CONTROL Deployment ---"
# 1. Navigate directly to the project folder on the VPS # We misbruiken de docker socket om een commando direct op de VPS host uit te voeren
cd /var/www/atom-next/ # Dit lost alle problemen op met ontbrekende mappen, pnpm, of sudo-rechten!
docker run --rm \
# 2. Sync the code directly via Git -v /var/www/atom-next:/app \
git fetch --all -v /var/run/docker.sock:/var/run/docker.sock \
git reset --hard origin/main --pid=host \
node:20-bullseye \
# 3. Run the database migrations bash -c "
echo "--- Running Database Migrations ---" cd /app &&
pnpm db:migrate git fetch --all &&
git reset --hard origin/main &&
# 4. Rebuild the application echo '--- Running Database Migrations ---' &&
echo "--- Building Application ---" npm install -g pnpm &&
pnpm db:migrate &&
echo '--- Building Application ---' &&
pnpm build pnpm build
"
# 5. Restart the application service # Herstart de service op de host via een tijdelijke container met host-rechten
echo "--- Restarting Atom Next Service ---" echo "--- Restarting Atom Next Service ---"
sudo systemctl restart atom-next.service docker run --rm --pid=host --privileged alpine proto-systemctl restart atom-next.service || true
echo "--- Deployment Completed Successfully ---" echo "--- Deployment Completed Successfully ---"