getzola / themes

Creates the templates section to be used in Zola doc site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature] automatize site generation after merge

Hugo-Trentesaux opened this issue · comments

If someone has experience with GitHub automation, it would be nice to generate automatically the theme site after a merge occurs in master.

That would be very nice.

This shouldn't be hard to do, I think I can quickly put something together when I have time maybe over the weekend. Probably the only question I think I have is when the site is generated, should it just be saved as a built artifact from the action or should be uploaded somewhere?

The output needs to be committed in https://github.com/getzola/zola since that's where the documentation is.
The first step would be to have some CI that highlights which themes are invalid since I keep missing things when I check manually.

If any of the zola checks for themes fail with an error we fail the whole build, right? The other option I guess is to exclude that theme from the build, but I don't know if the current generator script supports it.

Right now the script just ignores invalid themes and reports them. No reason to block a deploy because one theme is missing something.

I was mostly referring to the validity check you mentioned in the previous comment. I understood it as running zola check on each theme, before running the generator Python script. And when I ran zola check on each individual theme, it fails for at least one. Should we just ignore these failures and skip those themes?

Ah no sorry, I didn't mean zola check, I meant the generator Python script. This repo is not aware of Zola, it only checks for files and keys in a couple of TOML files. No need for zola check here, just that the script can generate the theme page since that would mean it's probably fine.

The CI would be mainly checking that we are not adding themes that are invalid, because I didn't run the script manually and missed something like carpetscheme/lightspeed#1

Ah, gotcha :) I made a couple of fixes in the script btw because of lightspeed as well. Should I commit those beforehand?

On the 24 themes present in the repo, only 15 appear on the theme page. Is there a problem somewhere?

I think the latest generated themes site pull request is not merged yet.

I've merged it now

Now it's 22/24 :D

Now it's 22/24 :D

There are 2 themes which have errors so they get excluded by the generation script.

In the output of the latest run of the action, in the "Run the generator script" step, you can see the themes with errors.

It is zerm because it's missing a screenshot and lightspeed is missing the name property in its metadata.

@Keats I guess this can be closed as resolved?

commented

@zbrox where/how do I not generate a proper screenshot for zerm? I have some in the repository already and there is a deployed sample site at https://zerm.ejmg.now.sh/, so it's not like i can't just make another one as needed.

commented

alright, i've updated master to have a plain screenshot.png. hope that fixes it? @Keats

@ejmg the zerm submodule is still pointing to the older commit, so i'll push a pull request updating it to the current master in a sec

@ejmg Zerm is parsed and included in the generated theme site properly now. https://github.com/getzola/themes/runs/966061273?check_suite_focus=true

Next time @Keats merges a pull request from the themes repo it will show up on getzola.org.

[Edit] Sorry for the notifications spam, just noticed that it's merged already :) and Zerm is showing up on getzola.org

commented

@zbrox you are totally fine, sorry on my part for randomly popping up and @'ing about my theme 😅

I randomly remembered that my theme didn't get generated on zola and revisited to see if any developments occurred, rest is now history. Thanks for helping to get it working 🙂

62/65 themes available on the page
seems the action ran successfully
Zola site still has to be updated.