Skip to content

액션 추가

액션 추가 #21

Workflow file for this run

name: FAST API CI/CD
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: 체크아웃 레포지토리
uses: actions/checkout@v3
# 하나의 SSH 액션으로 모든 배포 작업 수행
- name: 전체 배포 프로세스
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
script: |
cd ${{ secrets.APP_DIR }}
git pull origin main
# 도커 컴포즈로 서비스 실행
docker compose down
docker compose up -d --build