Files
EpicNext-Cms/.gitea/workflows/deploy.yaml
T
remco 627a4d7353
Remote Build and Deploy / deploy (push) Successful in 24s
Update .gitea/workflows/deploy.yaml
2026-07-11 22:11:02 +02:00

48 lines
1.6 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"
username: "root"
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
echo "--- Starting EPIC WEB CONTROL Deployment ---"
# 1. Navigate to your project directory on the VPS
cd /var/www/atom-nexst/
# 2. Synchronize the application files via Git
git fetch --all
git reset --hard origin/main
# --- CLEAN-UP STEP (After git reset, before build) ---
echo "--- Moving or removing specific items ---"
# rm -rf /var/www/atom-nexst/directory-name
# mkdir -p /var/www/atom-storage-temp && mv /var/www/atom-nexst/config-file.json /var/www/atom-storage-temp/
# Load environment variables from .env file for the next steps
export $(grep -v '^#' .env | xargs)
# 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 ---"