Skip to content

Commit

Permalink
chore: Github Action 오류 수정
Browse files Browse the repository at this point in the history
- mysql 경로 복사 처리 추가
  • Loading branch information
codemario318 committed Jan 8, 2025
1 parent dd93bc7 commit 1641bbc
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,24 +114,12 @@ jobs:
# 필요한 파일들을 서버로 복사
scp -i ~/.ssh/id_rsa docker-compose.yml ${{ secrets.DEPLOY_USER }}@${{ secrets.PUBLIC_SERVER_IP }}:~/booquiz/
scp -i ~/.ssh/id_rsa -r nginx ${{ secrets.DEPLOY_USER }}@${{ secrets.PUBLIC_SERVER_IP }}:~/booquiz/
scp -i ~/.ssh/id_rsa -r mysql ${{ secrets.DEPLOY_USER }}@${{ secrets.PUBLIC_SERVER_IP }}:~/booquiz/
# 환경 변수 파일 생성 및 서비스 배포
ssh -i ~/.ssh/id_rsa ${{ secrets.DEPLOY_USER }}@${{ secrets.PUBLIC_SERVER_IP }} "
cd ~/booquiz
# mysql 디렉토리와 init.sql 생성
mkdir -p mysql
cat > mysql/init.sql << 'EOL'
-- 문자셋 설정
ALTER DATABASE \`${DB_DATABASE}\`
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_unicode_ci;
-- 권한 설정
GRANT ALL PRIVILEGES ON \`${DB_DATABASE}\`.* TO '${DB_USERNAME}'@'%';
FLUSH PRIVILEGES;
EOL
cat > .env << EOL
DOCKER_USERNAME=$DOCKER_USERNAME
DOCKER_TAG=$DOCKER_TAG
Expand Down

0 comments on commit 1641bbc

Please sign in to comment.