Skip to content

Commit

Permalink
Merge pull request #76 from boostcampwm-2024/Feature/#006_배포_자동화_구축
Browse files Browse the repository at this point in the history
Feature/#006_배포_자동화_구축
  • Loading branch information
pipisebastian authored Nov 7, 2024
2 parents 4051320 + 7c57caf commit 3a6741c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy on Server

on:
push:
branches:
- main

jobs:
deploy:
runs-on: [self-hosted, boost-was] # 라벨에 해당하는 runner로 실행

steps:
# 1. 레포지토리 클론
- name: Checkout Repository
uses: actions/checkout@v3

# 2. Docker Compose로 서비스 빌드 및 재시작
- name: Set up Docker
uses: docker/setup-buildx-action@v2

- name: Build and Deploy Docker Images
run: |
# docker-compose로 배포
docker-compose up -d --build
# 3. Clean up Old Images
- name: Remove Dangling Images
run: docker image prune -f

0 comments on commit 3a6741c

Please sign in to comment.