Skip to content

Commit

Permalink
Travis: only build src branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwpolska committed Mar 17, 2017
1 parent 2e1e47e commit 1b51b93
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions listings/travis.yml
Expand Up @@ -6,6 +6,9 @@ addons:
apt:
packages:
- language-pack-en-base
branches:
only:
- src
python:
- 3.6
before_install:
Expand Down
11 changes: 6 additions & 5 deletions posts/automating-nikola-builds-with-travis-ci.rst
@@ -1,7 +1,7 @@
.. title: Automating Nikola rebuilds with Travis CI
.. slug: automating-nikola-rebuilds-with-travis-ci
.. date: 2016-08-24 18:05:25 UTC
.. updated: 2017-03-17 16:20:00 UTC
.. updated: 2017-03-17 17:15:00 UTC
.. tags: Travis CI, GitHub, automation, tips
.. author: Chris Warrick
.. type: text
Expand Down Expand Up @@ -57,9 +57,10 @@ are a few important things you need to take care of:
into an infinite loop.
* We assume your source branch is ``src`` and you deploy to ``master``. Any
other configuration requires editing ``.travis.yml``.
* If you ever commit to ``master`` manually, make sure to add ``[ci skip]`` to
your commit messages, otherwise there might be failed builds (with errors
about ``Rakefile`` missing)
* We enable builds only for the ``src`` branch by default. Older versions of
the script did not include this provision, and thus committing to ``master``
(which you should not do, as your changes will be overwritten on next Travis
rebuild) used to cause ``Rakefile`` errors.

If everything works, you can make some change to your site (so you see that
rebuilding works), but don’t commit it just yet.
Expand Down Expand Up @@ -125,4 +126,4 @@ Hopefully, Travis CI will build your site and deploy. Check the Travis CI
website or your e-mail for a notification. If there are any errors, make sure
you followed this guide to the letter.

(Revision 2, 2017-03-17: added master/src branching information, clarified some things)
(Revision 3, 2017-03-17: added master/src branching information, blocked non-src builds, clarified some things)
2 changes: 1 addition & 1 deletion state_data.json
@@ -1,3 +1,3 @@
{
"last_deploy": "2017-03-17T17:07:36.313455"
"last_deploy": "2017-03-17T17:17:27.469103"
}

0 comments on commit 1b51b93

Please sign in to comment.