Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hovancik/middleman-github-deploy
build your Middleman site and push it to your gh-pages branch
https://github.com/hovancik/middleman-github-deploy
deployment github-pages middleman middleman-extension
Last synced: about 1 month ago
JSON representation
build your Middleman site and push it to your gh-pages branch
- Host: GitHub
- URL: https://github.com/hovancik/middleman-github-deploy
- Owner: hovancik
- License: mit
- Created: 2016-01-04T09:19:40.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-07T17:44:59.000Z (over 1 year ago)
- Last Synced: 2024-05-02T00:56:59.919Z (9 months ago)
- Topics: deployment, github-pages, middleman, middleman-extension
- Language: Ruby
- Homepage:
- Size: 19.5 KB
- Stars: 15
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/hovancik/middleman-github-deploy.svg)](https://travis-ci.org/hovancik/middleman-github-deploy)
[![Gem Version](https://badge.fury.io/rb/mgd.svg)](http://badge.fury.io/rb/mgd)
[![Dependency Status](https://gemnasium.com/hovancik/middleman-github-deploy.svg)](https://gemnasium.com/hovancik/middleman-github-deploy)# What is mgd ?
mgd stands for middleman-github-deploy and is a fork of [jgd](https://github.com/yegor256/jekyll-github-deploy).
mgd will automatically build your Middleman blog and push it to your gh-pages
branch (or any other branch of your choice).# Installation and Usage
It is assumed that your blog is in the home directory of your repo.
Install it first:
```bash
gem install mgd
```Run it locally:
```bash
mgd
```Now your site is deployed to `gh-pages` branch of your repo. Done.
PS. You can also specify target branch, with is `gh-pages` by default. Use
`--branch` command line option.## Ruby ad rubygems versions
Everything should work fine with ruby > 2.0.There is a bug with rubygems (https://github.com/rubygems/rubygems/issues/1420), so if you're getting error like this:
```
$ mgd
/Users/user/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for # (NoMethodError)
from /Users/user/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
from /Users/user/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/gems/mgd-0.1.0/bin/mgd:4:in `'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/bin/mgd:23:in `load'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/bin/mgd:23:in `'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/bin/ruby_executable_hooks:15:in `eval'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/bin/ruby_executable_hooks:15:in `'```
check what is your gem version, should be higher than 2.6.3:
```
$ gem --version
```you can update it via:
```
$ gem update --system # you might need to be an administrator or root
```# Deploying with Travis
This is how you might configure your blog
to be deployed automatically by [travis-ci](http://www.travis-ci.org):```yaml
branches:
only:
- master
env:
global:
- secure: ...
install:
- bundle
script: mgd -u http://yourname:[email protected]/yourname/blog.git
```The environment variable `$PASSWORD` is set through
`env/global/secure`, as explained
[here](http://docs.travis-ci.com/user/encryption-keys/).Don't forget to add `gem require 'mgd'` to your `Gemfile`.
You can use SSH key instead. First, you should [encrypt](https://docs.travis-ci.com/user/encrypting-files/) it:
```bash
$ travis encrypt-file id_rsa --add
```Then, use the URI that starts with `git@`:
```yaml
script:
- mgd -u [email protected]:yourname/blog.git
```Read also [this article](http://www.yegor256.com/2014/06/22/jekyll-github-deploy.html).