Skip to content

Commit

Permalink
Merge pull request #2 from Board-Buddy/ci/#1
Browse files Browse the repository at this point in the history
Ci/#1
  • Loading branch information
ChaeYubin authored Jul 14, 2024
2 parents d5bc99d + f832665 commit 36aeeb9
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"es2021": true
},
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
Expand Down Expand Up @@ -36,6 +37,13 @@
"ts": "never",
"tsx": "never"
}
]
],
"no-console": "off",
"react/require-default-props": "off",
"react/jsx-props-no-spreading": "off",
"import/prefer-default-export": "off",
"react/function-component-definition": "off",
"react/jsx-no-useless-fragment": "off",
"import/no-extraneous-dependencies": "off"
}
}
37 changes: 37 additions & 0 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Check

on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Check Node version
run: node -v

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install

- name: Build project
run: npm run build
23 changes: 23 additions & 0 deletions .github/workflows/deploy_dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
workflow_dispatch:

jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Metadata } from 'next';
import { Inter as FontSans } from 'next/font/google';
import { cn } from '@/utils/tailwind';
import './../styles/globals.css';
import '../styles/globals.css';
import { MSWComponent } from '@/mocks/MSWComponent';
import Link from 'next/link';

Expand Down
1 change: 1 addition & 0 deletions src/mocks/MSWComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client';

import { useEffect, useState } from 'react';

export const MSWComponent = ({ children }: { children: React.ReactNode }) => {
Expand Down

0 comments on commit 36aeeb9

Please sign in to comment.