Files
bini-shorts-maker/.gitea/workflows/deploy.yaml
kihong.kim e442eb0168
Some checks failed
Deploy to Server / deploy (push) Has been cancelled
Fix server path to /home/bini/project/bini-shorts-maker
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 19:08:41 +09:00

41 lines
1023 B
YAML

name: Deploy to Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy to server via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
port: ${{ secrets.SERVER_PORT }}
script: |
cd /home/bini/project/bini-shorts-maker
echo "=== Pulling latest code ==="
git fetch origin
git reset --hard origin/main
echo "=== Rebuilding Docker containers ==="
docker compose build --no-cache
echo "=== Restarting containers ==="
docker compose down
docker compose up -d
echo "=== Cleaning up old images ==="
docker image prune -f
echo "=== Deployment completed ==="
docker compose ps