feat: job 진행율 기능 및 UI 추가 #73
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy on dev (self-hosted @172.16.0.172) | |
| on: | |
| push: | |
| branches: [ "develop" ] | |
| pull_request: | |
| types: [ closed ] | |
| branches: [ "develop" ] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) }} | |
| runs-on: [ self-hosted, dev ] | |
| concurrency: | |
| group: deploy-develop | |
| cancel-in-progress: false | |
| steps: | |
| - name: Clean checkout | |
| shell: bash | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -euo pipefail | |
| echo "🧹 Cleaning up previous deployment..." | |
| cd /home/bytesize/cvat/ | |
| docker compose -f AutoLabelingTool/docker-compose.yml down || true | |
| rm -rf AutoLabelingTool | |
| echo "📥 Fresh checkout from GitHub..." | |
| git clone https://oauth2:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git AutoLabelingTool | |
| cd AutoLabelingTool | |
| git checkout dev | |
| echo "✅ Clean checkout completed!" | |
| - name: Build and deploy | |
| working-directory: /home/bytesize/cvat/AutoLabelingTool | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| echo "🔨 Building Docker images..." | |
| export NGINX_CONF=react_nginx.conf | |
| docker compose -f docker-compose.yml -f docker-compose.build.yml build | |
| echo "🗄️ DB 마이그레이션 실행..." | |
| # 인자 없이 실행 → 미적용된 모든 migration을 자동으로 반영 | |
| docker compose -f docker-compose.yml -f docker-compose.build.yml \ | |
| run --rm cvat_server python manage.py migrate | |
| echo "🚀 Starting services..." | |
| export CVAT_HOST=172.16.0.172 | |
| docker compose -f docker-compose.yml -f docker-compose.build.yml up -d | |
| echo "✅ Deployment completed successfully!" |