GitAction 스크립트를 작성하라 #4
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 ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./server | |
steps: | |
- 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 : .env setting | |
run : | | |
echo "JWT_TOKEN=${{secrets.JWT_SECRET}}" >> .env | |
- name: install | |
run: npm install | |
- name: test | |
run: npm test | |
- name: build | |
run: npm run build |