fix: 이메일 인증 확인 #120
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: ["main", "dev"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# node 버전 | |
- name: Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
# env 파일 생성 | |
- name: Generate env file | |
run: | | |
echo "NEXTAUTH_SECRET=$NEXTAUTH_SECRET" >> .env | |
echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env | |
echo "NEXT_PUBLIC_KAKAO_CLIENT_ID=$NEXT_PUBLIC_KAKAO_CLIENT_ID" >> .env | |
echo "NEXT_PUBLIC_KAKAO_REDIRECT_URI=$NEXT_PUBLIC_KAKAO_REDIRECT_URI" >> .env | |
echo "NEXT_PUBLIC_SERVER_API=$NEXT_PUBLIC_SERVER_API" >> .env | |
env: | |
NEXTAUTH_SECRET: ${{secrets.NEXTAUTH_SECRET}} | |
NEXTAUTH_URL: ${{secrets.NEXTAUTH_URL}} | |
NEXT_PUBLIC_KAKAO_CLIENT_ID: ${{secrets.NEXT_PUBLIC_KAKAO_CLIENT_ID}} | |
NEXT_PUBLIC_KAKAO_REDIRECT_URI: ${{secrets.NEXT_PUBLIC_KAKAO_REDIRECT_URI}} | |
NEXT_PUBLIC_SERVER_API: ${{secrets.NEXT_PUBLIC_SERVER_API}} | |
# key를 사용하여 node modules 캐싱 | |
- name: Cache node modules | |
id: cache-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} | |
# restore-keys 중에서 매칭되는 것이 있으면, 캐시에 있는 파일을 path에 복원 | |
restore-keys: ${{ runner.os }}-node-modules- | |
- if: ${{ steps.cache-modules.outputs.cache-hit != 'true' }} | |
name: Install packages | |
# npm ci는 package-lock 파일 기반으로 설치(쓰기 권한 없음) -> npm install보다 빠르다. | |
# 단, node_modules를 삭제하고 의존성을 한번에 설치함 -> 시간 지연 가능성이 있으므로 캐시 hit인 경우에만 그대로 사용 | |
run: npm ci | |
- name: Build | |
run: npm run build |