Pelican-Elegant / elegant

Best theme for Pelican Static Blog Generator
https://elegant.oncrashreboot.com/
MIT License
293 stars 187 forks source link

Automatically update the documentation site when elegant master is updated #331

Closed talha131 closed 5 years ago

talha131 commented 5 years ago

@iranzo Is it possible to recompile the docs and push them to the github pages, every time we see a change has been made in Elegant master branch?

Just now I have merged your changes that fixes the accordion issue https://github.com/Pelican-Elegant/elegant/pull/200 but the docs have not been updated.

iranzo commented 5 years ago

Hi @talha131 , It now does update when a merge happens on master branch on documentation repo.

I've tried to see if there was another way to pull trigger but not sure that as I was downgraded cannot configure settings on one side, and that also caused that a rebuild I triggered was unable to 'reuse' the token given by @silverhook to push it.

talha131 commented 5 years ago

I've tried to see if there was another way to pull trigger but not sure that as I was downgraded cannot configure settings on one side

@iranzo I have upgraded you to admin again. Please look into the issue.

As for the token, you can let me or @silverhook know about it and we will generate it.

Is there a better way to fix this token mess? Should we add a bot account? But then who would keep its password?

iranzo commented 5 years ago

No, I meant, that I was seeing the account as below: image

Now I do see it as: image

No longer grayed out

iranzo commented 5 years ago

I'll check how to trigger a build when new merge to master is done (in repo elegant)

iranzo commented 5 years ago

https://github.com/stephanmg/travis-dependent-builds ?

iranzo commented 5 years ago

Similar use case as ours: https://hiddentao.com/archives/2016/08/29/triggering-travis-ci-build-from-another-projects-build/

silverhook commented 5 years ago

CC @ashwinvis

iranzo commented 5 years ago

I think from what I've read that the path would be to enable travis on 'elegant' repo so one of the tasks is to run the 'trigger' on documentation repo

iranzo commented 5 years ago

Issue for documenting the process so far at #24 (before we also trigger on master builds on elegant theme repo)

talha131 commented 5 years ago

Close with https://github.com/Pelican-Elegant/elegant/pull/205

talha131 commented 5 years ago

@iranzo is this feature really working?

See I just merged in the elegant repo following commit.

https://github.com/Pelican-Elegant/elegant/commit/c0624f9cfc38806c1eeff6d67ac7558b1830355c

It should have triggered regeneration of documents site. Instead we see the relevant page is unchanged

https://pelican-elegant.github.io/archives.html

and Travis build history does not show any new activity.

https://travis-ci.org/Pelican-Elegant/documentation/builds

Am I missing something here?

talha131 commented 5 years ago

If you see the archives now, it is working. But that's due to build that was triggered by updating documentation repo directly via 815d600d07917fe7f49500c81486d4d88ce9c27a.

The trigger for elegant repo is not working.

iranzo commented 5 years ago

Hi, It worked when I did tested it, I'll make a new irrelevant merge on this to test the trigger, is that ok?

Regards, Pablo

iranzo commented 5 years ago

Still, I've checked the latest commit on master:

https://travis-ci.org/Pelican-Elegant/elegant/builds/466849258

If you click on 'raw log'

it goes to https://api.travis-ci.org/v3/job/466849259/log.txt

And at the end you can find:

$ node trigger-build.js
The build was successfully restarted.
travis_time:end:157881a6:start=1544593617547398721,finish=1544593618717400056,duration=1170001335
travis_fold:end:after_success

Done. Your build exited with 0.

So apparently, the build was triggered

If we go to the builds on documentation, I can see:

image

So it looks like it was building the website and it was cancelled because a new build was scheduled (the one with commit on documentation), so you'll see '36' and '38' as success, but '37' is not listed there.

iranzo commented 5 years ago

I've created https://github.com/Pelican-Elegant/elegant/pull/208 to restest 'now', @talha131 can you merge it so that we can check it triggers the build of documentation?

talha131 commented 5 years ago

Thank you. Testing it.

talha131 commented 5 years ago

@iranzo have a look. Merging your commit, triggered a build on elegant repo.

https://travis-ci.org/Pelican-Elegant/elegant/builds/466870378

It's last line read,

$ node trigger-build.js
The build was successfully restarted.
Done. Your build exited with 0.

Now if I go documentation build history, it is stuck at 38.

https://travis-ci.org/Pelican-Elegant/documentation/builds

iranzo commented 5 years ago

image

iranzo commented 5 years ago

So a build has been triggered 2 minutes ago and was succesful

talha131 commented 5 years ago

To my understanding, it was triggered when I approved your changes in your PR here

https://github.com/Pelican-Elegant/documentation/pull/33

See, I have just added a commit

https://github.com/Pelican-Elegant/elegant/commit/b2e6edaa71ea91e2b71c0e6154df2691ca70e106

It has triggered build

https://travis-ci.org/Pelican-Elegant/elegant/builds/466873198

Lets wait 15 min and see if we see anything new at

https://travis-ci.org/Pelican-Elegant/documentation

My premise is that we won't.

iranzo commented 5 years ago

Build 39 is booting again with the changes:

image

talha131 commented 5 years ago

Ok. So you mean Travis does not start a new build but just reboots the last build?

That explains it.

I wonder why archives page was not updated when pushed fixed to elegant repo. Perhaps I should have waited a bit longer, as you said

So it looks like it was building the website and it was cancelled because a new build was scheduled (the one with commit on documentation), so you'll see '36' and '38' as success, but '37' is not listed there.

talha131 commented 5 years ago

Thanks a lot for taking your time to explain the issue to me. You have been very patient.

iranzo commented 5 years ago

Yes, it does start the last build, there was another page I looked at that triggered a new one, but the tests I did failed so I did this way.

Remember that once the build is done, it also takes some time for GH pages to show latest version as prior ones are cached, etc.

Regards, Pablo