Skip to content

Commit

Permalink
[CHORE] NestJS 서버 CI 과정에서 제외
Browse files Browse the repository at this point in the history
  • Loading branch information
Ji hwan Shin authored and Ji hwan Shin committed Apr 10, 2024
1 parent 8b33123 commit 16fbf45
Showing 1 changed file with 29 additions and 34 deletions.
63 changes: 29 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}

- name: Print Current Directory
run: pwd

- name: Create application.properties from secret
run: |
echo "${{ secrets.APPLICATION_SECRET_SPRING_DEV }}" > ./main/src/main/resources/application-secret.properties
Expand All @@ -45,38 +42,36 @@ jobs:
cd main
./gradlew clean build
# NsetJs 서버의 경우 변경될 사항이 없다고 생각하여 CI 작업 생략 / 만약 CI 작업이 필요하다면 맨 밑의 주석 참고
# build-nestjs:
# name: Build and analyze (NestJS)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0

build-nestjs:
name: Build and analyze (NestJS)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '21'

- name: Cache npm packages
uses: actions/cache@v3
with:
path: server/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('server/package-lock.json') }}
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '21'

- name: Print Current Directory
run: pwd
# - name: Cache npm packages
# uses: actions/cache@v3
# with:
# path: server/node_modules
# key: ${{ runner.os }}-node-${{ hashFiles('server/package-lock.json') }}

- name: Create .dev.env from secret
run: |
echo "${{ secrets.APPLICATION_SECRET_NESTJS_DEV }}" > ./server/.dev.env
shell: bash
# - name: Create .dev.env from secret
# run: |
# echo "${{ secrets.APPLICATION_SECRET_NESTJS_DEV }}" > ./server/.dev.env
# shell: bash

- name: Build and analyze (NestJS)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd server
npm ci
npm run start
# - name: Build and analyze (NestJS)
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# cd server
# npm ci
# npm run start
# Create .dev.env 작업을 통해 .dev.env 파일을 생성했음에도 CI 작업이 실패함.

0 comments on commit 16fbf45

Please sign in to comment.