City, NPO in deal to shelter homeless