Skip to content

Commit 1b51b93

Browse files
committedMar 17, 2017
Travis: only build src branch
1 parent 2e1e47e commit 1b51b93

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed
 

‎listings/travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ addons:
66
apt:
77
packages:
88
- language-pack-en-base
9+
branches:
10+
only:
11+
- src
912
python:
1013
- 3.6
1114
before_install:

‎posts/automating-nikola-builds-with-travis-ci.rst

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. title: Automating Nikola rebuilds with Travis CI
22
.. slug: automating-nikola-rebuilds-with-travis-ci
33
.. date: 2016-08-24 18:05:25 UTC
4-
.. updated: 2017-03-17 16:20:00 UTC
4+
.. updated: 2017-03-17 17:15:00 UTC
55
.. tags: Travis CI, GitHub, automation, tips
66
.. author: Chris Warrick
77
.. type: text
@@ -57,9 +57,10 @@ are a few important things you need to take care of:
5757
into an infinite loop.
5858
* We assume your source branch is ``src`` and you deploy to ``master``. Any
5959
other configuration requires editing ``.travis.yml``.
60-
* If you ever commit to ``master`` manually, make sure to add ``[ci skip]`` to
61-
your commit messages, otherwise there might be failed builds (with errors
62-
about ``Rakefile`` missing)
60+
* We enable builds only for the ``src`` branch by default. Older versions of
61+
the script did not include this provision, and thus committing to ``master``
62+
(which you should not do, as your changes will be overwritten on next Travis
63+
rebuild) used to cause ``Rakefile`` errors.
6364

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

128-
(Revision 2, 2017-03-17: added master/src branching information, clarified some things)
129+
(Revision 3, 2017-03-17: added master/src branching information, blocked non-src builds, clarified some things)

‎state_data.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"last_deploy": "2017-03-17T17:07:36.313455"
2+
"last_deploy": "2017-03-17T17:17:27.469103"
33
}

0 commit comments

Comments
 (0)
Please sign in to comment.