Coastal building projects are set to benefit from a £40m fund to transform seaside hubs after the government invited bids through the Coastal Communities Fund.