[FE/BE] 백, 프론트 docker를 이용한 배포 및 alpha 서버, main 서버 분리 #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [back/main, front/main] | |
pull_request: | |
branches: [main, back/main, dev] | |
jobs: | |
BE-test-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
cache-dependency-path: ./BE/package-lock.json | |
- name: Install dependencies | |
working-directory: ./BE | |
run: npm ci | |
- name: Run tests | |
run: npm test | |
working-directory: ./BE | |
env: | |
CI: true | |
- name: Run linter | |
working-directory: ./BE | |
run: npm run lint | |
- name: Build application | |
working-directory: ./BE | |
run: npm run build | |
FE-test-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
cache-dependency-path: ./BE/package-lock.json | |
- name: Install dependencies | |
working-directory: ./FE | |
run: npm ci | |
- name: Run linter | |
working-directory: ./FE | |
run: npm run lint | |
- name: Build application | |
working-directory: ./FE | |
run: npm run build |