GithubHelp home page GithubHelp logo

swaevior / jekyll-github-deploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yegor256/jekyll-github-deploy

0.0 2.0 0.0 58 KB

Jekyll Site Automated Deployer to GitHub Pages

License: MIT License

Ruby 73.88% Shell 26.12%

jekyll-github-deploy's Introduction

Managed by Zerocracy DevOps By Rultor.com We recommend RubyMine

Build Status Gem Version Dependency Status Code Climate

What is jgd ?

If you use some plugins with your Jekyll blog, chances are you can not have your blog generated by GitHub.

This is where jekyll-github-deploy (a.k.a. jgd) comes in: it will automatically build your Jekyll blog and push it to your gh-pages branch.

Installing

It is assumed that your blog is in the home directory of your repo.

Install it first:

gem install jgd

Run it locally:

jgd

Now your site is deployed to gh-pages branch of your repo. Done.

Command Line Options

Below is a list of all command line options.

Option Description
-u or --url The GitHub URL. Defaults to th URL of your current project.
-b or --branch The branch to push your site to. Defaults to gh-pages. If the branch does not exist, it will be created.
-r or --branch-from The source branch. Defaults to master.
-c or --config Name of the optional deploy config file. See Production variables below for more information.
-d or --drafts Adds the --drafts option to Jekyll so that it will build draft posts.
-h or --help Displays a list of all options.

Production variables

If you need to have different values for your deployed blog, just add a _config-deploy.yml file in your project's root and you're set. Values re-defined in _config-deploy.yml will override those defined in _config.yml.

Typical usage includes changing site url, disable disqus or ga in development...., you name it.

While _config-deploy.yml is the default, you may specify any config file by using the --config command line option.

For example:

$ jgd -c _config-deploy-develop.yml -r develop -b gh-pages-develop

Deploying with Travis

This is how I configure my Jekyll blog to be deployed automatically by travis-ci:

branches:
  only:
    - master
env:
  global:
    - secure: ...
install:
  - bundle
script: jgd -u http://yegor256:[email protected]/yegor256/blog.git

The environment variable $PASSWORD is set through env/global/secure, as explained here.

Don't forget to add gem require 'jgd' to your Gemfile.

You can use SSH key instead. First, you should encrypt it:

$ travis encrypt-file id_rsa --add

Then, use the URI that starts with git@:

script:
  - jgd -u [email protected]:yegor256/blog.git

Read also this article.

Building locally

In order to build a package locally run below commands.

gem build jgd.gemspec
gem install jgd-<version>.gem

jekyll-github-deploy's People

Contributors

yegor256 avatar leucos avatar donavon avatar rultor avatar darekmydlarz avatar worace avatar torbjoernk avatar wilsonmar avatar

Watchers

James Cloos avatar sb swae avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.