flowstate/.forgejo/workflows/deploy.yml
Chneemann 8891c106a2
All checks were successful
Deploy Flowstate to VPS / deploy (push) Successful in 53s
fix(ci): repair ssh deployment pipeline and drizzle migrations
2026-08-15 12:06:46 +02:00

36 lines
1,010 B
YAML

name: Deploy Flowstate to VPS
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Trigger Build & Deploy via SSH
uses: https://github.com/appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }}
port: ${{ secrets.VPS_PORT }}
script_stop: true
script: |
echo "Starting deployment..."
cd /opt/containers/projects/flowstate
echo "Pulling latest code..."
git pull origin main
echo "Applying DB migrations..."
docker compose exec -T flowstate-studio npx drizzle-kit push --config=drizzle.config.ts
echo "Rebuilding Docker containers..."
docker compose up -d --build
echo "Cleaning up unused Docker images..."
docker image prune -f
echo "Deployment completed successfully."