IT기타

github에 프로젝트 생성, 배포-> Vercel에 배포.

emilyyoo 2025. 7. 1. 21:14
728x90
반응형

1. github에 프로젝트 생성 후 배포 후 

//장바구니에 담기

git add .

//이름표 붙임
git commit -m "커밋메시지"

//프로젝트 생성과 배포
gh repo create 프로젝트명 --private --source=. --remote=origin --push

 

 

2. Vercel에 배포

https://vercel.com/new


"Import Git Repository" 섹션에서 git에 배포된 프로젝트 검색.

검색되면 "import" 버튼으로 프로젝트 가져오고 deploy.

안되면 vercel에 해당 프로젝트 접근 권한이 없는 것. 아래와 같이 권한 설정해줌.
 
설정 "Adjust GitHub App Permissions →"

"Repository access" 섹션에서
 
Only select repositories > select repositories 에서 vercel에 권한 주기. 

 

 

 

3. 참고로 루트디렉토리에 "vercel.json"으로 vercel관련 설정을 해주면 편하다. 예를 들어 아래처럼 index이름이 아닌 첫페이지를 설정할 수 있다. 

{
    "rewrites":
   [
      {
         "source": "/",
         "destination": "/betterweHomepage.html"
      }
   ]
}
728x90
반응형