A security guard has been hailed for his heroic actions in response to a fire emergency at a homeless refuge in York.