add deploy script; fix order of build steps