From c9e4020bc44eee7a14178355ec69431c85218f0d Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 14:28:24 +0900 Subject: [PATCH] chore: pr-CI.yml --- .github/workflows/pr-CI.yml | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/pr-CI.yml diff --git a/.github/workflows/pr-CI.yml b/.github/workflows/pr-CI.yml new file mode 100644 index 00000000..52f8fab2 --- /dev/null +++ b/.github/workflows/pr-CI.yml @@ -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 \ No newline at end of file