No you can't deduct the cost of a roof on your personal residence.
If it is a rental house, then it gets capitalized and is depreciated.