SciNim / getting-started

Getting started with Nim for Scientific Computing
https://scinim.github.io/getting-started/
Creative Commons Zero v1.0 Universal
59 stars 6 forks source link

Preview builds of PRs #23

Closed HugoGranstrom closed 2 years ago

HugoGranstrom commented 3 years ago

Something I think would be very useful when reviewing PRs is to have CI build it automatically and deploy it so one can just open a link and read it directly, instead of having to download it locally build it oneself.

I have tried to set up Netlify over at my fork and it seems to work: https://github.com/HugoGranstrom/getting-started/pull/1

I must admit it feels a bit hacky the way I had to do it, installing Nim and building in a single command. Here is the command I used btw:

curl https://nim-lang.org/choosenim/init.sh -sSf -o ./init.sh && sh ./init.sh -y && export PATH=/opt/buildhome/.nimble/bin:$PATH && nimble install -d -y && nim r -d:release getting_started.nim build

Is this something we would want? In that case, I could try and set it up here as well.

Vindaar commented 3 years ago

Is this something we would want? In that case, I could try and set it up here as well.

What kind of a question is that? Hell yeah!

HugoGranstrom commented 3 years ago

It's the kind of question I ask so that people can shout "Don't use it, use this much better service instead!" or something like that at me if they know more about these stuff :P

Vindaar commented 3 years ago

Well, I don't know much about these things, so maybe there is such a thing. But having one that is maybe suboptimal beats not having a preview.

HugoGranstrom commented 3 years ago

That is very true! :)

HugoGranstrom commented 3 years ago

If we want a free "open source plan" with features equivalent to the Pro tier on Netlify we need to fulfill these requirements: https://www.netlify.com/legal/open-source-policy/

The most prominent feature would be unlimited team members (instead of the 1 we have for free right now I think).

HugoGranstrom commented 3 years ago

We might actually chew through our 300 build minutes quite fast as it rebuilds on every push to a PR and every build takes around 6 minutes atm and will likely only grow with more files. I'm looking into if we can just upload the build from the valid action instead so Netlify doesn't have to build it.