jekyll-git-deploy
Executable commands to help you to deploy your jekyll blog through git push way conveniently!
Getting Started
- Install The Gem Install it through command line(recommended):
gem install jekyll-git-deployor, install it through the Gemfile:
gem 'jekyll-git-deploy', '~> 0.0.2'- Config Additional Keys In Your
_config.ymlfile:
# #{site_root}/_config.yml
deploy_repo: git@something.com:martin/jekyll-deploy-demo.git
touch_file: Staticfile
deploy_branch: github-pages
deploy_remote_name: githubMore details about these configs will be described later.
- Initialize The Destination Run the below command in the root of your jekyll site:
jekyll-git-deploy init- Deploy The Site
jekyll-git-deploy deployMore Details
1. Supported Commands
Currently, jekyll-git-deploy supports its name as the main command and also two sub commands: init and deploy. They are mainly used to:
-
init: Check and create destination directory for your deployment, and then check and initialize a git repo there -
deploy: Build the site usingjekyll build, touch a specified file if necessary(some PaaS requires that a specifed name should be existed, they need that to detect a suitable running environment), create or checkout to deploy branch, commit changes and push them to specified repo and its branch.
2. Supported Configs
jekyll-git-deploy dependent on five configs to work, the first one is destination, which is supported by jekyll itself already, here we use it to detect the target directory for generated site. The other four configs are:
| Config | Purpose | Default Value | Required |
|---|---|---|---|
| deploy_repo | Specify the deploy target, should be a remote git repo | NONE | YES |
| deploy_branch | Specify the deploy target branch | pages | NO |
| deploy_remote_name | Specify the remote name added to git, work with deploy_repo | deploy | NO |
| touch_file | Specify the file shoule be touched during a deployment | Staticfile | NO |
To see source codes, visit Source codes for configs.
Contribute Guides
This project is just in its initial stage, more features or patches are welcome.
- Fork this repo;
- Clone your forked repo to your local file system;
- Check out to a new branch;
- Write and test your codes;
- Commit and push your changes to a remote branch in your forked repo;
- Submit a new PR.