7f59b94dcf
Rebrand repository from "Re:Link" to "Startover" across the codebase. Updates include package names and scopes (@relink/* -> @startover/*), import paths, Next.js transpile settings, vitest name, UI text and docs, Dockerfile and CI/workflow names, deploy scripts and repo paths, and example/production env values. Also add auth-related env vars, an apps/web .env symlink, and small formatting/typing cleanups in several TSX/TS files and tests to accommodate the rename.
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Deploy Startover
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Create .env.production
|
|
run: |
|
|
cat > .env.production << 'ENVEOF'
|
|
DB_USER=${{ secrets.DB_USER }}
|
|
DB_PASSWORD=${{ secrets.DB_PASSWORD }}
|
|
DB_NAME=${{ secrets.DB_NAME }}
|
|
REDIS_PASSWORD=${{ secrets.REDIS_PASSWORD }}
|
|
NEXTAUTH_URL=${{ secrets.NEXTAUTH_URL }}
|
|
NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }}
|
|
ENVEOF
|
|
|
|
- name: Build and Deploy
|
|
run: |
|
|
docker compose -f docker-compose.prod.yml --env-file .env.production up -d --build --remove-orphans
|
|
|
|
- name: Run database migrations
|
|
run: |
|
|
docker compose -f docker-compose.prod.yml exec -T web sh -c "cd /app && npx prisma migrate deploy" || echo "Migration skipped (first deploy)"
|
|
|
|
- name: Health check
|
|
run: |
|
|
echo "Waiting for services to start..."
|
|
sleep 10
|
|
curl -f http://localhost/health || echo "Health check pending - services may still be starting"
|
|
|
|
- name: Cleanup old images
|
|
run: |
|
|
docker image prune -f
|