Files
startover/.gitea/workflows/deploy.yml
T
Johngreen df8569053b perf: BuildKit + docker compose v2로 빌드 속도 개선
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 22:10:37 +09:00

44 lines
1.1 KiB
YAML

name: Deploy Startover
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
steps:
- name: Pull latest code
run: |
cd /home/three/startover/repo
git fetch origin
git reset --hard origin/main
echo "Current commit: $(git log --oneline -1)"
- name: Copy environment file
run: |
cp /home/three/startover/.env.production /home/three/startover/repo/.env.production
- name: Build and Deploy
run: |
cd /home/three/startover/repo
docker compose -f docker-compose.prod.yml --env-file .env.production up -d --build --remove-orphans
- name: Wait for services
run: sleep 15
- name: Health check
run: |
if curl -sf http://localhost/health > /dev/null 2>&1; then
echo "Health check PASSED"
else
echo "WARNING: Health check pending"
fi
- name: Cleanup old images
run: docker image prune -f