Altai-man / docs.raku.org

Source code of a beta version of the updated docs.raku.org website
Artistic License 2.0
11 stars 6 forks source link

Document how to update doc repo #59

Closed coke closed 2 years ago

coke commented 2 years ago

We have docker instructions for doing the initial build of the site - because this takes a while, we probably need instructions on how to do the minimum to update the docs site; I'm guessing we also want those instructions to end with swapping out the old running site for the newly updated container, but I'm not 100% sure.

Altai-man commented 2 years ago

Can you please elaborate, do you mean loading a new version of the doc repo while the site is still running, replacing or in the future completing the existing content, or?

coke commented 2 years ago

I mean a new version of the doc repo on an already running instance of the website.

Once we're deployed and running on docs.raku.org, this will be a common use case.

Altai-man commented 2 years ago

That's something to implement, yes.

Altai-man commented 2 years ago

Wrote a prototype locally, need time to cleanup the code.

Right now the basic API is "get the git describe" of the doc repo used and an "update" command sent with a secret token, doing the "update the repo, registry and remove cache of the changed pages". So to update the version to latest what's needed is a ping to docs.raku.org/update?token=... and it does the thing.

Can be also configured to do an update every hour/day or something.

@coke does the process looks sensible to you in a long run?

coke commented 2 years ago

I don't like making this a public interface as it could be invoked by anyone and lead to a DDOS.

Altai-man commented 2 years ago

The update action is protected with a secret token (no token = forbidden), so it can lead to a DDOS as DDOS-ing every other page would, no?

coke commented 2 years ago

I thought the update was unprotected and that anyone could initiate a site update; if it requires a secret token I have no concern.

Altai-man commented 2 years ago

Resolved, the docs are updated too.