pybricks / support

Pybricks support and general discussion
MIT License
109 stars 7 forks source link

Better deployment strategy #1836

Open dlech opened 3 years ago

dlech commented 3 years ago

We currently use the mirror feature of lftp for deploying the Pybricks Code website. This leaves the site in an inconsistent state for a few minutes while the upload happens. There are probably better deployment strategies out there that would reduce the window for causing problems for users, but I don't know what they are.

laurensvalk commented 11 months ago

Instead of lftp, we could locally zip it, scp it to the server, then ssh to unzip remotely. This takes seconds instead of several minutes.

I've currently set up a script to do it from my local machine for quick deployments.

I'm currently doing the upload to a separate autoupload folder instead of directly to the beta folder. Then rename current build to a versioned folder for backup, and move autoupload to beta by renaming, which is also near instant. This could also be done in the same ssh script but I've been doing this final step manually just to be safe so far.

This also avoids the slow per-file deletion.