이미지 파일 변경 시 기존 파일을 변경하는 로직을 추가하라 #142
Workflow file for this run
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: server | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./server | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.12.0 | |
cache: "npm" | |
cache-dependency-path: ./package-lock.json | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: server/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }} | |
- name : Setting .ENV | |
run : | | |
echo "JWT_SECRET=${{ secrets.JWT_SECRET }}" > .env | |
- name: Install | |
run: npm install | |
- name: Install Dependencies | |
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
run: npm ci | |
- name: Run Test(only Changed) | |
run: npm run test:only-changed | |
- name: Run Lint(only Changed) | |
run : npm run format:diff | |
- name: Run Build | |
run: npm run build |