publish direct to firebase hosting

who needs to download a cli tool when you can make API calls

SEAN K.H. LIAO

publish direct to firebase hosting

who needs to download a cli tool when you can make API calls

firebase hosting

Firebase is an "app development platform", or in other words, a specialized set of cloud services linked with Google Cloud Platform. Hosting is their static site hosting solution. At some point, I used them, liked their URL cleanup behavior (enforce trailing slash), moved around to different hosts as I experimented with things, and now I'm back there.

render and upload

Firebase has a CLI that they tell you to use for most things, including uploading your static site. For the longest time, I did that:

This took somewhere between 30s and a minute, not too bad but a lot of the time seemed to be in downloading containers... Also, why bother writing to the disk anyway?

upload from memory

Thankfully, firebase provides API access, So no need to download their node.js based cli with a bunch of features you're not going to use, just render into an in memory file system, check which files you need to send, and upload.

These days my CI runs take between 10-15s. Barely enought time to context switch away. Current blog engine.