Skip to content

release-fix: [BE] DB 비동기 순서 에러 수정 #5

release-fix: [BE] DB 비동기 순서 에러 수정

release-fix: [BE] DB 비동기 순서 에러 수정 #5

Workflow file for this run

name: backEnd API server CD
on:
push:
branches: [BE/release, main]
permissions:
contents: read
jobs:
api-server-ci:
runs-on: ubuntu-latest
steps:
- name: ✅ 코드 체크아웃
uses: actions/checkout@v3
- name : 👻 노드 설정
uses : actions/setup-node@v3
with:
node-version: '20'
- name: ⬇️ 의존성 설치
working-directory: ./backEnd/api
run: npm install
- name: 📦 프로젝트 빌드
working-directory: ./backEnd/api
run: npm run build
- name: 🐳 도커 로그인
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_TOKEN}}
- name: ⬆️ Docker Image Build
working-directory: ./backEnd/api
run: |
docker build -t ${{secrets.DOCKER_USERNAME}}/api .
docker push ${{secrets.DOCKER_USERNAME}}/api
- name: 🏃‍♂️ Deploy
uses: appleboy/[email protected]
with:
host: ${{secrets.API_HOST}}
username: ${{secrets.API_USERNAME}}
password: ${{secrets.API_PASSWORD}}
port: ${{secrets.API_PORT}}
script: |
cd /root
echo "WEB_HOOK_URL=${{secrets.WEB_HOOK_URL}}" >> .env
echo "PORT=${{secrets.PORT}}" >> .env
echo "DB_HOST=${{secrets.DB_HOST}}" >> .env
echo "DB_PORT=${{secrets.DB_PORT}}" >> .env
echo "DB_USERNAME=${{secrets.DB_USERNAME}}" >> .env
echo "DB_PASSWORD=${{secrets.DB_PASSWORD}}" >> .env
echo "DB_DATABASE=${{secrets.DB_DATABASE}}" >> .env
echo "SYNCHRONIZED=${{secrets.SYNCHRONIZED}}" >> .env
echo "NODE_ENV=production" >> .env
echo "RUNNING_SERVER=${{secrets.RUNNING_SERVER_URL}}" >> .env
echo "TIMEOUT=${{secrets.TIMEOUT}}" >> .env
echo "REDIS_HOST=${{secrets.REDIS_HOST}}" >> .env
echo "REDIS_PORT=${{secrets.REDIS_PORT}}" >> .env
echo "REDIS_PASSWORD=${{secrets.REDIS_PASSWORD}}" >> .env
echo "CLIENT_ID_GITHUB=${{secrets.CLIENT_ID_GITHUB}}" >> .env
echo "CLIENT_SECRET_GITHUB=${{secrets.CLIENT_SECRET_GITHUB}}" >> .env
echo "JWT_ACCESS_SECRET=${{secrets.JWT_ACCESS_SECRET}}" >> .env
echo "JWT_ACCESS_EXPIRE=${{secrets.JWT_ACCESS_EXPIRE}}" >> .env
echo "JWT_REFRESH_SECRET=${{secrets.JWT_REFRESH_SECRET}}" >> .env
echo "JWT_REFRESH_EXPIRE=${{secrets.JWT_REFRESH_EXPIRE}}" >> .env
echo "SESSION_SECRET=${{secrets.SESSION_SECRET}}" >> .env
bash deploy.sh >> /dev/deploy.log 2>&1