-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from TEAM-MONGDOL/MF-362-CI-for-PRs-to-develo…
…p-and-main [chore] pr-CI.yml
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI for PRs to develop and main | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
PROJECT_NAME: dkation | ||
REPOSITORY_NAME: dkation-prod-front | ||
IMAGE_NAME: dkation-prod-fe | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
npm install -g npm@latest | ||
npm install sharp | ||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Build Next.js app | ||
run: npm run build | ||
env: | ||
NEXT_PUBLIC_SERVER_URL: ${{ secrets.NEXT_PUBLIC_SERVER_URL }} | ||
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | ||
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }} | ||
NEXT_PUBLIC_KAKAO_API_KEY: ${{ secrets.NEXT_PUBLIC_KAKAO_API_KEY }} | ||
|
||
- name: Test Build Output | ||
run: test -d .next |