happybell80 c09ba6a017 feat: Ubuntu 서버용 심플 nginx 배포 시스템 구축
- GitHub Actions를 심플하게 재구성 (불필요한 테스트 로그 제거)
- SSL 자동 설정 (Let's Encrypt)
- 프록시 라우팅 업데이트: /api/ → 18000, /rb8001/ → 8001
- 배포 경로: /opt/robeing-nginx

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-09 14:20:26 +09:00

36 lines
1007 B
YAML

name: Deploy to Ubuntu Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup SSH key
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.NAS_SSH_KEY_ADMIN }}
- name: Deploy via SSH
env:
HOST: ${{ secrets.NAS_HOST }}
PORT: ${{ secrets.NAS_PORT }}
USER: ${{ secrets.NAS_USER }}
run: |
ssh -o StrictHostKeyChecking=no -p $PORT $USER@$HOST << 'EOF'
sudo mkdir -p /opt/robeing-nginx
if [ -d "/opt/robeing-nginx/.git" ]; then
cd /opt/robeing-nginx && git pull origin main
else
git clone https://github.com/ivada-Robeing/nginx-deploy.git /opt/robeing-nginx
cd /opt/robeing-nginx
fi
sudo mkdir -p ssl certbot-webroot
sudo docker-compose down || true
sudo docker-compose up -d
EOF