whatwg / whatwg.org

The WHATWG website and other static resources
https://whatwg.org/
Other
76 stars 50 forks source link

Store specification build outputs in git #414

Open annevk opened 1 year ago

annevk commented 1 year ago

Having all our generated standards in git would help with issues such as https://github.com/speced/bikeshed/issues/2483 and would also help with reviewing changes such as when the W3C logo is added to certain Review Drafts.

Perhaps that should be a separate repository from this one, but filing it here for now.

tabatkins commented 1 year ago

I suggest setting up the server's folder structure as the working directory of a bare repo, then just cronning a commit once a day or something. I set up my own website this way and have some instructions at https://www.xanthir.com/b4or0. You can also push this to github if you want to make it more easily publicly accessible.

annevk commented 1 year ago

cc @foolip @sideshowbarker

tabatkins commented 1 year ago

Hm actually a bare repo probably isn't what you want - you're not gonna use git to publish to the server, you just want to snapshot the server to git regularly.

So you probably then just want to set up a normal repo, either using the server's web folder (hiding the .git folder from being served), or to the side and marking the web folder as the working tree, then cron a regular commit + push to GH.

I do something like for a different part of my website (my recipe database, which is updated via the site itself but mirrored to GH for safekeeping), and just have a cron command that looks like:

> cd /home/protected/db/recipes && git commit -am "update" && GIT_SSH_COMMAND='ssh -i /home/private/recipe-db_ssh/sshkey' git push origin master

This does rely on the GH being purely a mirror, never being pushed to, otherwise you'll need to manually pull from the server side to get back up to date. (or do a force push and just blow away any changes that accidentally get made at the GH side)