ca-grow-ops-manager/.forgejo/workflows/deploy.yml
fullsizemalt da7729d6e4
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
Test / backend-test (push) Failing after 0s
Test / frontend-test (push) Failing after 0s
Initial commit: Spec Kit foundation complete
- Constitution and project spec (spec.yml)
- 7 comprehensive feature specs (tasks, batches, labor, compliance, inventory, integrations, comms)
- Phase 1 implementation plan (6-week roadmap)
- Week 1 task breakdown (15 concrete tasks)
- Architecture and compliance documentation
- Backend and frontend setup guides
- Deployment guide for nexus-vector
- CI/CD workflows (Forgejo Actions)
- Quick start guide for developers

Project is ready for implementation with:
- Automated testing on every push
- Automatic deployment to nexus-vector on push to main
- Database migrations handled automatically
- Health checks and monitoring

Stack: TypeScript, Fastify, React, Vite, PostgreSQL, Prisma, Docker
2025-12-08 23:54:12 -08:00

44 lines
1.2 KiB
YAML

name: Deploy to Production
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy to nexus-vector
uses: appleboy/ssh-action@master
with:
host: nexus-vector
username: admin
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /srv/containers/ca-grow-ops-manager
echo "📥 Pulling latest code..."
git pull origin main
echo "🔨 Rebuilding containers..."
docker compose build --no-cache
echo "🗄️ Running database migrations..."
docker compose up -d db redis
sleep 5
docker compose run --rm backend npx prisma migrate deploy
echo "🚀 Restarting all services..."
docker compose up -d
echo "✅ Deployment complete!"
docker compose ps
echo "🏥 Health check..."
sleep 10
curl -f http://localhost:8010/api/healthz || echo "⚠️ Health check failed"