travis-ci fails to deploy

85 views
Skip to first unread message

Eli Spizzichino

unread,
Mar 17, 2017, 3:47:21 AM3/17/17
to nikola-discuss
Greetings to all, and thanks for creating and supporting Nikola.
I've successfully deployed the demo site on github pages with github_deploy. I have the source/master branch working as described in the doc and GITHUB_COMMIT_SOURCE = False and manually pushing source.
I've followed the guide to automate the deployment with travis but it first failed on 

$ git branch master FETCH_HEAD

fatal: A branch named 'master' already exists.


then removing that line it now fails saying no rakefile found

rake aborted!

No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `eval'

/home/travis/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `<main>'

(See full trace by running task with --trace)

The .travis.yml I'm using is the one in the guide with the necessary username/email substitutions. But if I run
$ travis lint .travis.yml
Warnings for .travis.yml:

[x] value for addons section is empty, dropping

[x] in addons section: unexpected key apt, dropping



I'm not very familiar with travis so I hope someone out there is using it to deploy nikola and can provide a working example beside the official site use a fairly different .travis.yml 




Chris Warrick

unread,
Mar 17, 2017, 4:13:18 AM3/17/17
to nikola-...@googlegroups.com
Rake errors like those appear when Travis ignores your config file. Please link to your GitHub repo so we can see what went wrong.

--
Chris Warrick <https://chriswarrick.com/>

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Warrick

unread,
Mar 17, 2017, 1:18:12 PM3/17/17
to Nikola—Discuss
(We don’t use Travis to build getnikola.com or any of our other websites.)

I received a link to the GitHub repo in private. I fully respect that,
but I’m still going to answer publicly so that others can learn as
well:

1. Never commit to `master` on your own, at least not without `[ci
skip]` in the commit message — but note that Travis will overwrite it
nevertheless on next rebuild. Only change the `src` branch (or update
your .travis.yml to build only `src`, see updated guide)
2. Ignore `travis lint` output, it doesn’t recognize that syntax for
some reason — but it’s valid, and necessary.
3. Because you enabled some tidy filters, you need to install tidy5 to
build your site.

I also updated the guide with this:
https://getnikola.com/blog/automating-nikola-rebuilds-with-travis-ci.html

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

Eli Spizzichino

unread,
Mar 18, 2017, 6:15:16 AM3/18/17
to nikola-discuss

I received a link to the GitHub repo in private. 
 
I actually don't mind if people want to use it as a starting point for an uikit based theme I'll later publish it as a separate repo.
 
1. Never commit to `master`
 Yes this is the source of confusion and it's probably worth to restart from scratch now that I got it working

2. Ignore `travis lint`
good to specify it in the doc 
3. Because you enabled some tidy filters, you need to install tidy5 to
build your site.
While we are on this topic why is called tidy5 and not tidy? can't find it in apt, should I download it from upstream and make a symbolic link to tidy5? 
But more importantly is this the best solution just to have the html properly indented?  I found this solution on SO using BeautifulSoup that don't mess with your html it just indent it. What is the best way to plug it in nikola?
good job now it works! (You just forget to update the line numbers where it says to change username/email etc )

Chris Warrick

unread,
Mar 18, 2017, 8:18:04 AM3/18/17
to Nikola—Discuss
On 18 March 2017 at 11:15, Eli Spizzichino <scr...@gmail.com> wrote:
>> 3. Because you enabled some tidy filters, you need to install tidy5 to
>> build your site.
>
> While we are on this topic why is called tidy5 and not tidy? can't find it
> in apt, should I download it from upstream and make a symbolic link to
> tidy5?

Figure it out yourself, there was an older version of tidy that didn’t
do HTML5. I’m not using this plugin and can’t help you.

> But more importantly is this the best solution just to have the html
> properly indented? I found this solution on SO using BeautifulSoup that
> don't mess with your html it just indent it. What is the best way to plug it
> in nikola?

We won’t support BeautifulSoup, and won’t ever do it. (BS often uses
lxml under the hood, and has an awful API, so it’s a waste of
resources). Why do you care about indentation? Web browsers will take
anything, it doesn’t have to look nice.

>> I also updated the guide with this:
>> https://getnikola.com/blog/automating-nikola-rebuilds-with-travis-ci.html
>
>
> good job now it works! (You just forget to update the line numbers where it
> says to change username/email etc )

Fixed.

Marcelo Huerta

unread,
Mar 18, 2017, 12:45:47 PM3/18/17
to nikola-...@googlegroups.com
Chris Warrick decía, en el mensaje "Re: [nikola-discuss] travis-ci fails to
deploy" del 18/3/2017 09:18:03:

> We won’t support BeautifulSoup, and won’t ever do it. (BS often uses
> lxml under the hood, and has an awful API, so it’s a waste of
> resources).

Besides the violently opinionated nature of the comment, whose vitriol
surprises me, I'm not clear if you're dissing the API for BS or for lxml.
Which one is it? Could you elaborate?

--
o-=< Marcelo >=-o

Chris Warrick

unread,
Mar 18, 2017, 1:13:17 PM3/18/17
to Nikola—Discuss
BeautifulSoup has an API that breaks the principle of least
astonishment, and that has non-constant attribute lists (eg.
`somedocument.a` might be all <a> elements in that document). Since we
already use lxml and ask it to pretty_print, there isn’t anything
BeautifulSoup will do better (and it would waste resources by having
to parse HTML once more).

Still, why do you need pretty HTML?

Marcelo Huerta

unread,
Mar 18, 2017, 2:25:09 PM3/18/17
to nikola-...@googlegroups.com
Chris Warrick decía, en el mensaje "Re: [nikola-discuss] travis-ci fails to
deploy" del 18/3/2017 14:13:15:

> Still, why do you need pretty HTML?

I'm not the OP, I just was surprised by the intensity of your hatred. I'll
chalk it up to holy wars reasoning and leave it at that.

--
o-=< Marcelo >=-o

Reply all
Reply to author
Forward
0 new messages