mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-05-19 09:28:47 +02:00
Add landing page, Docker setup, and CI/CD pipeline
React + Vite + TypeScript + Tailwind frontend with landing page, Docker Compose for dev and prod (nginx-proxy integration), and Gitea Actions workflow for automated deployment. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
41
.github/workflows/deploy.yml
vendored
Normal file
41
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Deploy to VPS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Write .env.prod
|
||||
run: |
|
||||
cat > .env.prod << 'ENVEOF'
|
||||
LETSENCRYPT_EMAIL=${{ secrets.LETSENCRYPT_EMAIL }}
|
||||
ENVEOF
|
||||
|
||||
- name: Build and deploy
|
||||
run: |
|
||||
docker compose -f docker-compose.prod.yml --env-file .env.prod build
|
||||
docker compose -f docker-compose.prod.yml --env-file .env.prod up -d --remove-orphans
|
||||
|
||||
- name: Wait for health
|
||||
run: |
|
||||
echo "Waiting for frontend..."
|
||||
for i in $(seq 1 30); do
|
||||
if docker inspect wealthysmart-frontend-prod --format '{{.State.Health.Status}}' 2>/dev/null | grep -q healthy; then
|
||||
echo "Frontend is healthy"
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
- name: Prune old images
|
||||
run: docker image prune -f
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: rm -f .env.prod
|
||||
Reference in New Issue
Block a user