You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may sound like a crazy idea, and I haven't found anybody doing this on the internet. Perhaps my google-foo is failing me, or perhaps it's just a stupid idea. If so, I'd be very interested in knowing why.
I was reading this Deno Deploy post where they advertise how great their v8 isolates are because they're already running and how most other CI systems (like GitHub Actions) spend most of their time starting the Docker image and downloading dependencies, and not on doing the actual build. This makes a lot of sense to me.
But while that post seems to advertise this approach for dynamic edge functions (e.g. Deno Fresh), surprisingly there is nowhere a mention of building a static site (e.g. with Lume). More googling brought up Static Files on Deno Deploy, but there they are using GitHub Actions again to call deployctl to upload the files to their CDN (because while you can use Deno.readFile etc. to read from the Deno CDN, you apparently cannot write to it that way). Thus you pay the VM startup time again.
Hence my question: has anybody tried building a static site at the edge (e.g. in a CloudFlare worker) and then upload the artefacts to a CDN? Potential obstacles:
lack of official REST API for uploading to CloudFlare CDN, but perhaps there are other CDNs that have one?
Perhaps the static site generator would need to be rewritten a bit to work on the virtual file system. But assuming that would work: any other show stoppers? Would we really get static site deployments in the one-digit seconds?
Posting this here, as I thought this crowd might have thought about these things already. But happy to be pointed to a place that fits the question better.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This may sound like a crazy idea, and I haven't found anybody doing this on the internet. Perhaps my google-foo is failing me, or perhaps it's just a stupid idea. If so, I'd be very interested in knowing why.
I was reading this Deno Deploy post where they advertise how great their v8 isolates are because they're already running and how most other CI systems (like GitHub Actions) spend most of their time starting the Docker image and downloading dependencies, and not on doing the actual build. This makes a lot of sense to me.
But while that post seems to advertise this approach for dynamic edge functions (e.g. Deno Fresh), surprisingly there is nowhere a mention of building a static site (e.g. with Lume). More googling brought up Static Files on Deno Deploy, but there they are using GitHub Actions again to call
deployctl
to upload the files to their CDN (because while you can useDeno.readFile
etc. to read from the Deno CDN, you apparently cannot write to it that way). Thus you pay the VM startup time again.Hence my question: has anybody tried building a static site at the edge (e.g. in a CloudFlare worker) and then upload the artefacts to a CDN? Potential obstacles:
Perhaps the static site generator would need to be rewritten a bit to work on the virtual file system. But assuming that would work: any other show stoppers? Would we really get static site deployments in the one-digit seconds?
Posting this here, as I thought this crowd might have thought about these things already. But happy to be pointed to a place that fits the question better.
Beta Was this translation helpful? Give feedback.
All reactions