Files
Momento/.gitea/workflows/deploy.yaml
Sepehr Ramezani 106dac9ca4
Some checks failed
Deploy to Production / Deploy to 192.168.1.190 (push) Has been cancelled
ci: add Gitea Actions workflow for auto-deploy on push to main
SSH-based deployment to 192.168.1.190 via Gitea Runner.
Builds Docker images and restarts containers automatically.

Required Gitea secrets: DEPLOY_HOST, DEPLOY_USER, DEPLOY_SSH_KEY, DEPLOY_PATH

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-21 22:34:18 +02:00

44 lines
1.0 KiB
YAML

name: Deploy to Production
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to 192.168.1.190
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.2.2
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
port: ${{ secrets.DEPLOY_PORT || 22 }}
script: |
set -e
echo "=== Memento Deploy ==="
echo "Branch: ${{ gitea.ref }}"
# Go to project directory
cd ${{ secrets.DEPLOY_PATH }}/Momento
# Pull latest code
git pull origin main
# Build and restart containers
docker compose build --parallel
docker compose up -d
# Wait for healthchecks
echo "Waiting for containers to be healthy..."
sleep 10
# Check status
docker compose ps
echo "=== Deploy complete ==="