From 62f9c629286f6f1ecfe397e6d4e326bda5314cf4 Mon Sep 17 00:00:00 2001 From: "Kim.KANGHEE" Date: Sat, 13 Dec 2025 20:46:26 +0900 Subject: [PATCH] Update .gitea/workflows/deploy.yml --- .gitea/workflows/deploy.yml | 44 ++++++++++--------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 5e17a9c..a31980c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -3,45 +3,25 @@ on: push: branches: - main - workflow_dispatch: # 수동 실행 가능 + workflow_dispatch: jobs: test: - name: Test + name: Test Build runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install dependencies + - name: List files run: | - pip install --upgrade pip - pip install -r requirements.txt - - - name: Run tests + echo "=== 파일 목록 ===" + ls -la + + - name: Check Python run: | - echo "테스트 실행 중..." - # pytest가 있다면: pytest - python -m pytest || echo "테스트 스킵" - - deploy: - name: Deploy to Server - runs-on: ubuntu-latest - needs: test # test 성공 후 실행 - if: github.ref == 'refs/heads/main' - steps: - - name: Deploy via SSH - run: | - echo "배포 시작..." - # SSH 설정 후 주석 해제: - # mkdir -p ~/.ssh - # echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - # chmod 600 ~/.ssh/id_rsa - # ssh-keyscan -H 192.168.0.97 >> ~/.ssh/known_hosts - # ssh user@192.168.0.97 "cd /path/to/vconnect-api && git pull && systemctl restart vconnect-api" - echo "배포 완료!" \ No newline at end of file + echo "=== Python 버전 ===" + python3 --version + + - name: Success + run: echo "CI/CD 테스트 성공!" \ No newline at end of file