Skip to content

[NL-72] 운세 목록 조회 API 수정 (#19) #16

[NL-72] 운세 목록 조회 API 수정 (#19)

[NL-72] 운세 목록 조회 API 수정 (#19) #16

Workflow file for this run

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
# 사용되지 않는 이미지 정리
docker system prune