Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-actionlint@v1.72.0
- uses: actions/checkout@v7
- uses: reviewdog/action-actionlint@v1.81.1
2 changes: 1 addition & 1 deletion .github/workflows/bashate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: 3.15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copyrights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: yegor256/copyrights-action@0.0.8
2 changes: 1 addition & 1 deletion .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
2 changes: 1 addition & 1 deletion .github/workflows/pdd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: volodya-lombrozo/pdd-action@master
2 changes: 1 addition & 1 deletion .github/workflows/rake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ruby: [3.3]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: fsfe/reuse-action@v5
2 changes: 1 addition & 1 deletion .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ludeeus/action-shellcheck@master
2 changes: 1 addition & 1 deletion .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: crate-ci/typos@v1.52.0
2 changes: 1 addition & 1 deletion .github/workflows/xcop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: g4s8/xcop-action@master
2 changes: 1 addition & 1 deletion .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- uses: ibiqlik/action-yamllint@v3
49 changes: 28 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<img src="/logo.svg" width="64px" height="64px"/>
# Jekyll GitHub Deploy

![Jekyll GitHub Deploy logo](/logo.svg)

[![DevOps By Rultor.com](https://www.rultor.com/b/yegor256/jekyll-github-deploy)](https://www.rultor.com/p/yegor256/jekyll-github-deploy)
[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
Expand All @@ -8,8 +10,8 @@
[![Hits-of-Code](https://hitsofcode.com/github/yegor256/jekyll-github-deploy)](https://hitsofcode.com/view/github/yegor256/jekyll-github-deploy)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/jekyll-github-deploy/blob/master/LICENSE.txt)

If you use some plugins with your [Jekyll](https://jekyllrb.com/) blog, chances are you can not
have your blog generated by [GitHub Pages](https://pages.github.com/).
If you use plugins with your [Jekyll](https://jekyllrb.com/) blog,
chances are you cannot have your blog generated by [GitHub Pages](https://pages.github.com/).
First of all, because they [do not allow](https://help.github.com/en/articles/adding-jekyll-plugins-to-a-github-pages-site)
custom plugins.
This is where jekyll-github-deploy (a.k.a. jgd) comes in: it will
Expand All @@ -23,27 +25,29 @@ It is assumed that your blog is in the home directory of your repo.
Install it first:

```bash
$ gem install jgd
gem install jgd
```

Run it locally:

```bash
$ jgd
jgd
```

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

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](#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. |
- `-u` or `--url`: The GitHub URL. Defaults to the 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](#production-variables) below for more information.
- `-d` or `--drafts`: Adds the `--drafts` option to Jekyll to 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
Expand All @@ -57,8 +61,9 @@ While `_config-deploy.yml` is the default, you may specify any config
file by using the `--config` command line option.

For example:

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

## Deploying with Travis
Expand All @@ -80,14 +85,15 @@ script: jgd -u http://yegor256:$PASSWORD@github.com/yegor256/blog.git

The environment variable `$PASSWORD` is set through
`env/global/secure`, as explained
[here](http://docs.travis-ci.com/user/encryption-keys/).
in the [Travis encryption guide](http://docs.travis-ci.com/user/encryption-keys/).

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

You can use SSH key instead. First, you should [encrypt](https://docs.travis-ci.com/user/encrypting-files/) it:
You can use an SSH key instead. First,
[encrypt the key](https://docs.travis-ci.com/user/encrypting-files/):

```bash
$ travis encrypt-file id_rsa --add
travis encrypt-file id_rsa --add
```

Then, use the URI that starts with `git@`:
Expand Down Expand Up @@ -116,12 +122,13 @@ and
Then:

```bash
$ bundle update
$ bundle exec rake --quiet
$ ./tesh.sh
bundle update
bundle exec rake --quiet
./test.sh
```

The build has to be clean. If it's not, [submit an issue](https://github.com/zold-io/out/issues).
The build has to be clean. If it is not,
[submit an issue](https://github.com/yegor256/jekyll-github-deploy/issues).

Then, make your changes, make sure the build is still clean,
and [submit a pull request](https://www.yegor256.com/2014/04/15/github-guidelines.html).
Loading