Deploy inside build step?

Found the solution, edited.

Perhaps you could roll back your question to its last good state, and add an answer? It might be helpful for someone else.