Files
startover/.gitea/workflows/deploy.yml
T
2026-03-29 21:49:54 +09:00

44 lines
1.1 KiB
YAML

name: Deploy Startover
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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