Skip to content

Commit

Permalink
ci/cd: 서버 파일 및 배포 설정 업데이트
Browse files Browse the repository at this point in the history
- 서버 파일을 ES6 문법으로 수정
- 파일 경로 및 디렉토리 설정 추가
- 배포 워크플로우에 로그 수집 단계 추가
- Elastic Beanstalk에서 로그 정보 요청 후 30초 대기
- 배포 상태 확인 스크립트 수정
- 배포 성공 또는 실패 메시지 출력
  • Loading branch information
virtue14 committed Jul 3, 2024
1 parent 0d187d9 commit 098c16e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ jobs:
use_existing_version_if_available: true
continue-on-error: true

- name: Fetch Logs from Elastic Beanstalk
run: |
aws elasticbeanstalk request-environment-info --environment-name MarketNawa-env --info-type tail
sleep 30
aws elasticbeanstalk retrieve-environment-info --environment-name MarketNawa-env --info-type tail
- name: Check Deployment Status
run: |
if [ "$?" != "0" ]; then
Expand Down
9 changes: 7 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
const express = require('express');
const path = require('path');
import express from 'express';
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const app = express();
const PORT = process.env.PORT || 8080;

Expand Down

0 comments on commit 098c16e

Please sign in to comment.