Files
EpicNext-Cms/.gitea/workflows/deploy.yaml
T
remco 0225d689d9
Remote Build and Deploy / deploy (push) Successful in 25s
Update .gitea/workflows/deploy.yaml
2026-07-11 22:08:15 +02:00

48 lines
1.7 KiB
YAML

name: Remote Build and Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploying via SSH connection to VPS Host
uses: appleboy/[email protected]
with:
host: "172.20.2.1" # The default bridge gateway IP pointing back to your VPS host
username: "root" # Replace with your actual VPS SSH username if not running as root
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
echo "--- Starting EPIC WEB CONTROL Deployment ---"
# 1. Navigate to your project directory on the bare metal VPS
cd /var/www/atom-nexst/
# [OPTIONEEL] Verwijder of verplaats hier lokale bestanden die NIET in Git staan en in de weg zitten
# rm -rf map-naam/
# rm -f bestand.txt
# 2. Synchronize the application files via Git
git fetch --all
git reset --hard origin/main
# [OPTIONEEL] Verwijder of verplaats hier bestanden die zojuist uit Git zijn binnengehaald, vòòr de build
# rm -rf specifieke-map-uit-git/
# mv bestand-uit-git.json /tmp/
# 3. Run database migrations natively
echo "--- Running Database Migrations ---"
pnpm db:migrate
# 4. Compile the updated distribution assets
echo "--- Building Application ---"
pnpm build
# 5. Restart the host background service cleanly
echo "--- Restarting Atom Nexst Service ---"
sudo systemctl restart atom-nexst.service
echo "--- Deployment Completed Successfully ---"