add spinner to build and deploy

- add loading flags
- handle errors when building