moved the deletion of files in the push function [skip ci]