tmux new -s deploy
Run your long command in there. Detach with Ctrl-b then d, and the session keeps running on the server after you log out.
Back later:
tmux ls
tmux attach -t deploy
Inside a session: Ctrl-b c opens a new window, Ctrl-b n and Ctrl-b p move between them, Ctrl-b % and Ctrl-b " split the pane. exit or Ctrl-d closes the current one.
tmux kill-session -t deploy ends it all.