Open dlech opened 3 years 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.
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.