[NL-58] 오늘의 운세 리소스/유저 오늘의 운세 관계 테이블 추가, 관리자용 오늘의 운세 CRUD/유저용 오늘의 운세 조… #7
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: CI/CD to NCP Server | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: deploy-main | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to NCP Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: satto-registry.kr.ncr.ntruss.com | |
| username: ${{ secrets.NCP_REGISTRY_USERNAME }} | |
| password: ${{ secrets.NCP_REGISTRY_PASSWORD }} | |
| - name: Build and Push Docker Image (linux/amd64) | |
| run: | | |
| docker buildx build --platform linux/amd64 \ | |
| -t satto-registry.kr.ncr.ntruss.com/satto-server-fastapi:latest \ | |
| --push . | |
| - name: Deploy to NCP Server | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.NCP_SERVER_HOST }} | |
| username: ${{ secrets.NCP_SERVER_USER }} | |
| password: ${{ secrets.NCP_SERVER_PASSWORD }} | |
| port: 22 | |
| script: | | |
| set -e | |
| cd /home/Satto-Server | |
| # 최신 이미지로 fastapi만 갱신/재기동 | |
| docker compose -f docker-compose.dev.yml up -d --pull always fastapi | |
| # 상태 확인 | |
| docker compose -f docker-compose.dev.yml ps fastapi |