PS, after some trial an error I ended up with function below which I'm mostly happy with. Usage is --
deploy, it'll print timestamp and link which is public, also copied into clipboard for convenience. This deployment is a snapshot, so calling
deploy multiple times will deploy new copies of the object.
Some lessons learned:
- Exporting object, then editing it in cloud invalidates the public URL link (the link will start prompting user to sign in), hence must export snapshots and never edit them.
- Using notebook filename as name for cloud object will overwrite previous results, so generate unique names by appending timestamp to filename.
(* Deploys current notebook, returns URL object *)
(* TODO: add support for notebooks with no name (current gets StringSplit failed) *)
(* print out machine name + path + date *)
notebookFn=FileNameSplit[NotebookFileName][[-1]]; (* just get basename *)
uniqueFn=StringJoin[notebookFn,"_", timeString, ".nb"];
(* todo, also update master copy in cloud and link to it using SourceLink? *)