Skip to content

Commit

Permalink
Reflect new GitHub Pages branching behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwpolska committed Aug 24, 2016
1 parent 39e065f commit 2971a12
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
15 changes: 8 additions & 7 deletions docs/manual.txt
Expand Up @@ -1261,10 +1261,11 @@ Deploying to GitHub
Nikola provides a separate command ``github_deploy`` to deploy your site to
GitHub Pages. The command builds the site, commits the output to a gh-pages
branch and pushes the output to GitHub. Nikola uses the `ghp-import command
<https://github.com/davisp/ghp-import>`_ for this.
<https://pypi.python.org/pypi/ghp-import2>`_ for this.

In order to use this feature, you need to configure a few things first. Make
sure you have ``nikola`` and ``git`` installed on your PATH.
sure you have ``nikola`` and ``git`` installed on your PATH. Also, install
``ghp-import2`` from PyPI (it provides a newer version of ``ghp-import``)

1. Initialize a Nikola site, if you haven’t already.
2. Initialize a git repository in your Nikola source directory by running:
Expand All @@ -1277,12 +1278,12 @@ sure you have ``nikola`` and ``git`` installed on your PATH.
3. Setup branches and remotes in ``conf.py``:

* ``GITHUB_DEPLOY_BRANCH`` is the branch where Nikola-generated HTML files
will be deployed. It should be ``gh-pages`` for project pages and
``master`` for user pages (user.github.io).
will be deployed. For new sites, ``master`` should be used; older sites
may use ``github-pages``.
* ``GITHUB_SOURCE_BRANCH`` is the branch where your Nikola site source will be
deployed. We default to ``master``, but user pages should use ``src`` or
something else.
* ``GITHUB_REMOTE_NAME`` is the remote to which changes are pushed.
deployed. We recommend ``src``.
* ``GITHUB_REMOTE_NAME`` is the remote to which changes are pushed. Usually,
it’s ``origin``.
* ``GITHUB_COMMIT_SOURCE`` controls whether or not the source branch is
automatically committed to and pushed. We recommend setting it to
``True``.
Expand Down
9 changes: 4 additions & 5 deletions nikola/conf.py.in
Expand Up @@ -478,13 +478,12 @@ REDIRECTIONS = ${REDIRECTIONS}
# github_deploy configuration
# For more details, read the manual:
# https://getnikola.com/handbook.html#deploying-to-github
# For user.github.io OR organization.github.io pages, the DEPLOY branch
# MUST be 'master', and 'gh-pages' for other repositories.
# GITHUB_SOURCE_BRANCH = 'master'
# GITHUB_DEPLOY_BRANCH = 'gh-pages'
# You will need to configure the deployment branch on GitHub.
GITHUB_SOURCE_BRANCH = 'src'
GITHUB_DEPLOY_BRANCH = 'master'

# The name of the remote where you wish to push to, using github_deploy.
# GITHUB_REMOTE_NAME = 'origin'
GITHUB_REMOTE_NAME = 'origin'

# Whether or not github_deploy should commit to the source branch automatically
# before deploying.
Expand Down

0 comments on commit 2971a12

Please sign in to comment.