Gatsbyアプリをデプロイ
Gatsby has been a static-site generator from the start, and gatsby build has written to the same public folder for years. Nothing unusual here — build it, deploy it.
- 01
Build the site
Run "gatsby build" (or "npm run build", which calls the same thing). Gatsby pre-renders every page and writes optimized static output to "public".
- 02
Skip develop mode
"gatsby develop" starts a live-reloading dev server on its own port — it's not what produces deployable output. You want "build", not "develop".
- 03
デプロイする
プロジェクトのルートで「npx harvis deploy public」を実行してください。この最初のデプロイに設定もログインも不要 — すぐに公開URLが手に入り、いつでも無料アカウントにサイトを紐付けられる非公開のオーナー登録リンクも一緒に発行されます。
Gatsbyをコマンド1つでデプロイ
プロジェクトをビルドして、出力フォルダをharvisに渡すだけ。最初のデプロイにアカウントは不要 — 公開リンクと、あとで管理するための非公開のオーナー登録リンクが手に入ります。
gatsby build npx harvis deploy public
ターミナルよりファイルをドラッグする方が好みですか?プロジェクトをビルドしたら、出力フォルダをここにドロップすれば同じように公開できます。
Gatsbyのデプロイに関する質問
My Gatsby site pulls data from a CMS. Does that still work after deploying?
Yes, as long as the data fetching happens at build time through Gatsby's GraphQL data layer, which is the normal Gatsby pattern. The page is already fully rendered with that data baked in by the time gatsby build finishes — nothing needs to run at request time.
Do Gatsby's dynamic routes and client-only paths work?
Pages generated via createPages at build time work fine — they're plain files in public. Client-only routes (Reach Router matchPath) render in the browser after the shell loads, and harvis's fallback to your entrypoint HTML handles the direct-visit case.
Gatsbyアプリをharvisにデプロイするのは本当に無料ですか?
はい、クレジットカードは不要です。無料枠は1サイトあたり500ファイル・50 MBで、静的なGatsbyのビルドなら十分すぎるほどです。公開したサイトに有効期限はなく、削除するまで公開され続けます。
デプロイしたGatsbyサイトに独自ドメインは使えますか?
どのサイトも無料のharvis.devアドレスが割り当てられ、オーナー登録後にダッシュボードから好きなサブドメインを選べます(ランダムな名前の代わりにmy-app.harvis.devのように)。すでに持っている独自ドメイン(mystore.comなど)をサイトに向ける機能は、まだ用意されていません。
GatsbyをVercelやNetlifyにデプロイするのと何が違いますか?
VercelやNetlifyは、Gitリポジトリを接続してビルドを自分たちのサーバー上で実行し、ダッシュボードで設定する仕組みが中心です。harvisはそれをすべて省略します。ローカル(または自分のCI)でビルドし、出力フォルダに対してCLIコマンドを1つ実行するだけでリンクが手に入ります — プロジェクトの設定も、サイトを残しておきたくなるまでのアカウントも不要です。
別のものをデプロイしますか?
手順はどれでも同じです — ビルドしてから、出力フォルダをnpx harvis deployするだけ。