- heteml管理画面で
ssh
アカウントを作成 - 発行されたアカウント情報で
sshログイン
する - 適宜ディレクトリを移動して
site.git
など適当なレポジトリ格納用ディレクトリを作る - 上述のディレクトリ(
/site.git/
)に移動してgit init --bare
-
/site.git/hooks/
へ移動してtouch post-receive
-
vim post-receive
で以下記述#!/bin/sh git --work-tree=/path/to/yoursite --git-dir=/path/to/yoursite/ site.git checkout -f
この時
/path/to/yoursite
はpwd
で調べたものを入れる(userとしてのルートからのパスは違う)chmod +x post-receive
で権限を変更リモートレポジトリに
ssh://yourusername@ssh***.heteml.jp:2222/path/to/yoursite/site.git
を登録(***には1で発行したサーバー情報を入れる)
秘密鍵の登録とかその辺はやってないので逐次パスを聞かれて若干うるさい。