How to copy a custom app from server to other?

hello community ? I got this server that is really damaged , I want to copy a custom app we created to another new server . how exactly I can do this ?

Push it to github, pull to the new server.

that exactly what I did.