Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jgd

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jgd

  • 1.14.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Managed by Zerocracy DevOps By Rultor.com We recommend RubyMine

rake Gem Version Hits-of-Code License

If you use some plugins with your Jekyll blog, chances are you can not have your blog generated by GitHub Pages. First of all, because they do not allow custom plugins. 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. You may want to read this blog post before you start using this tool: Deploy Jekyll to GitHub Pages.

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.

Below is a list of all command line options.

OptionDescription
-u or --urlThe GitHub URL. Defaults to th URL of your current project.
-b or --branchThe branch to push your site to. Defaults to gh-pages. If the branch does not exist, it will be created.
-r or --branch-fromThe source branch. Defaults to master.
-c or --configName of the optional deploy config file. See Production variables below for more information.
-d or --draftsAdds the --drafts option to Jekyll so that it will build draft posts.
-h or --helpDisplays a list of all options.

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:$PASSWORD@github.com/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 git@github.com:yegor256/blog.git

Building locally

In order to build a package locally run below commands.

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

How to Contribute

First, install Ruby 2.3+, Rubygems, and Bundler. Then:

$ bundle update
$ bundle exec rake --quiet
$ ./tesh.sh

The build has to be clean. If it's not, submit an issue.

Then, make your changes, make sure the build is still clean, and submit a pull request.

FAQs

Package last updated on 08 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc