Jekyll

Jekyllアプリをデプロイ

Jekyll is what GitHub Pages runs under the hood for plain Jekyll sites, and the output is identical either way: a self-contained _site folder of plain HTML. Point the CLI at it directly.

steps
  1. 01

    Build the site

    Run "bundle exec jekyll build" (plain "jekyll build" also works if you're not using Bundler). Jekyll converts your Markdown and layouts into static HTML in a "_site" folder.

  2. 02

    Skip serve mode

    "jekyll serve" starts a local dev server with live reload — it builds into "_site" too, but you want it stopped and a plain "build" run for a clean deploy.

  3. 03

    デプロイする

    プロジェクトのルートで「npx harvis deploy _site」を実行してください。この最初のデプロイに設定もログインも不要 — すぐに公開URLが手に入り、いつでも無料アカウントにサイトを紐付けられる非公開のオーナー登録リンクも一緒に発行されます。

Jekyllをコマンド1つでデプロイ

プロジェクトをビルドして、出力フォルダをharvisに渡すだけ。最初のデプロイにアカウントは不要 — 公開リンクと、あとで管理するための非公開のオーナー登録リンクが手に入ります。

terminal
bundle exec jekyll build
npx harvis deploy _site

ターミナルよりファイルをドラッグする方が好みですか?プロジェクトをビルドしたら、出力フォルダをここにドロップすれば同じように公開できます。

git hook

Deploy Jekyll on every git push

The command above is one you will run again after every change. A git hook runs it for you: this one already points at _site, the folder Jekyll builds into.

The folder holding the finished site. "." is the repo root, which is right for hand-written HTML; a static-site generator writes somewhere else.

pre-push fires on every branch and every remote, so a feature branch would publish over your live site. With this on, a push from anywhere else exits early and goes through untouched.

in your repo root
cat > .git/hooks/pre-push <<'EOF'
#!/bin/sh
set -e
bundle exec jekyll build
harvis deploy _site
EOF
chmod +x .git/hooks/pre-push

The options, the gotchas and how to share a hook with your team are on the git hook page.

Jekyllのデプロイに関する質問

I already use GitHub Pages for this Jekyll site. Why deploy here too?

GitHub Pages ties the site to a GitHub repo and its own domain scheme. Deploying the same _site folder here with npx harvis gets you an independent live link in about two seconds — handy for previewing a branch or a client draft before it's ready to merge.

Does Jekyll's built-in Sass and asset pipeline still work?

Yes — Sass compiles to plain CSS as part of jekyll build, so by the time _site exists everything is already plain static files. Nothing about the deploy step needs to know Jekyll was involved.

Jekyllアプリをharvisにデプロイするのは本当に無料ですか?

はい、クレジットカードは不要です。無料枠は1サイトあたり500ファイル・50 MBで、静的なJekyllのビルドなら十分すぎるほどです。公開したサイトに有効期限はなく、削除するまで公開され続けます。

デプロイしたJekyllサイトに独自ドメインは使えますか?

どのサイトも無料のharvis.pageアドレスが割り当てられ、オーナー登録後にダッシュボードから好きなサブドメインを選べます(ランダムな名前の代わりにmy-app.harvis.pageのように)。すでに持っている独自ドメイン(mystore.comなど)をサイトに向ける機能は、まだ用意されていません。

JekyllをVercelやNetlifyにデプロイするのと何が違いますか?

VercelやNetlifyは、Gitリポジトリを接続してビルドを自分たちのサーバー上で実行し、ダッシュボードで設定する仕組みが中心です。harvisはそれをすべて省略します。ローカル(または自分のCI)でビルドし、出力フォルダに対してCLIコマンドを1つ実行するだけでリンクが手に入ります — プロジェクトの設定も、サイトを残しておきたくなるまでのアカウントも不要です。

other frameworks

別のものをデプロイしますか?

手順はどれでも同じです — ビルドしてから、出力フォルダをnpx harvis deployするだけ。