Skip to content

hotfix: idx -> position으로 변경 #99

hotfix: idx -> position으로 변경

hotfix: idx -> position으로 변경 #99

name: develop 브랜치에서 프론트엔드 CI/CD 파이프라인 구축
on:
push:
branches:
- 'develop'
paths:
- 'packages/client/**'
workflow_dispatch:
jobs:
deploy:
runs-on: [self-hosted, client] # client 레이블이 있는 self-hosted runner 사용
steps:
- name: 소스 코드 불러오기
uses: actions/checkout@v4
- name: Create .env file
run: |
echo "VITE_SERVER_URL=${{ secrets.VITE_SERVER_URL }}" >> packages/client/.env
echo "VITE_CLIENT_URL=${{ secrets.VITE_CLIENT_URL }}" >> packages/client/.env
- name: 기존 컨테이너 정리
run: |
docker stop you-quiz-fe || true
docker rm you-quiz-fe || true
docker image prune -f
- name: Docker 빌드 및 실행
run: |
docker build -t you-quiz-fe:${{ github.run_number }} -f Dockerfile.fe .
docker run -d \
--name you-quiz-fe \
--env-file packages/client/.env \
-v /etc/letsencrypt/live/www.you-quiz.site/fullchain.pem:/etc/nginx/ssl/fullchain.pem \
-v /etc/letsencrypt/live/www.you-quiz.site/privkey.pem:/etc/nginx/ssl/privkey.pem \
-p 80:80 \
-p 443:443 \
you-quiz-fe:${{ github.run_number }}