Skip to content

Commit

Permalink
[mod] production 모드일 때만 빌드하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyejungg committed Apr 1, 2022
1 parent 7908108 commit e212092
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/pushServerCICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,23 @@ jobs:
echo SLACK_API_TOKEN=${{ secrets.SLACK_API_TOKEN }} >> .env
# CI 시, build하여 server.js 파일 생성
- name: Run build
run: |
echo NODE_ENV="development" >> .env
npm run build --if-present
# main 브랜치에 대한 PR만 빌드하여 S3에 업로드
- name: Run build (main)
if: ${{ github.base_ref == 'main' }}
run: |
echo NODE_ENV="production" >> .env
npm run build:production --if-present
npm run build:production --if-present
- name: Sharing files between jobs.
if: ${{ github.base_ref == 'main' }}
uses: actions/upload-artifact@v1
with:
name: dist
path: ./dist

deploy:
needs: build
if: ${{ github.base_ref == 'main' }}
runs-on: ubuntu-latest
steps:
# build job에서 빌드한 파일(./dist/pushScheduler.js) 가져오기
Expand Down

0 comments on commit e212092

Please sign in to comment.