Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 1.92 KB

heroku.mdx

File metadata and controls

62 lines (45 loc) · 1.92 KB
title description type i18nReady
Astro 사이트를 Heroku에 배포하세요
Heroku를 사용하여 Astro 사이트를 웹에 배포하는 방법.
deploy
true

import { Steps } from '@astrojs/starlight/components';

Heroku는 클라우드에서 최신 앱을 빌드, 실행, 관리하기 위한 서비스형 플랫폼입니다. 이 안내서를 통해 Astro 사이트를 Heroku에 배포할 수 있습니다.

:::danger 다음 지침에서는 지원 중단된 heroku-static-buildpack을 사용합니다. 대신 heroku-buildpack-nginx 사용에 대한 Heroku 문서를 참조하세요. :::

배포 방법

1. [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli)를 설치합니다.
  1. 가입하여 Heroku 계정을 만듭니다.

  2. heroku login을 실행하고 Heroku 자격 증명을 입력합니다.

    $ heroku login
  3. 아래 내용으로 프로젝트 루트에 static.json 파일을 생성합니다.

    {
      "root": "./dist"
    }

    이것이 여러분의 사이트 구성입니다. heroku-buildpack-static에서 자세한 내용을 읽어보세요.

  4. Heroku git remote를 설정합니다:

    # version change
    $ git init
    $ git add .
    $ git commit -m "My site ready for deployment."
    
    # creates a new app with a specified name
    $ heroku apps:create example
    
    # set buildpack for static sites
    $ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-static.git
  5. 사이트를 배포합니다.

    # publish site
    $ git push heroku master
    
    # opens a browser to view the Dashboard version of Heroku CI
    $ heroku open