What is the difference between "Build & Deploy: Prod" and "Deploy Only"?

I’m using the “Deploy to GitHub Pages (script)” and wondering which one I should use in my workflow when I make updates to my project. The site is already up.

Original Post on Discord

by user 216692838757433347

Hello there – we have an experimental AI bot :robot: that might be able to help you with your question. Would you like to try this out?

Build & deploy production will export the scene, run compresssion and optimization and then deploy (upload to GitHub pages) while deploy only will only upload what you had built/exported before

I 'm not sure when its OK to use Deploy instead of Build & Deploy. Is it the case that if I had previously used Build & Deploy then made changes without adding new assets (like changing the value of a variable) then Deploy is OK, but if I added a new 3D asset it would require Build & Deploy since compression is needed?

by user 216692838757433347

If you change anything in Unity you need “Build & Deploy” - if you make changes in your webproject (HTML or CSS) deploy only is enough.

Generally if you’re unsure go with Build & Deploy - does it take very long for you? Usually it only takes a few seconds or in large projects maybe minutes but since we cache e.g. lots of compression results and re-use those if the asset didnt change it shouldnt be a problem to run the whole export again

It doesn’t take that long, I just didn’t know the difference and wanted a well-rounded understanding. Thanks!

by user 216692838757433347

Ok great - makes sense :slightly_smiling_face: