Actually, Death Valley in June will be unbelievably hot--like around 115 to 120 degrees on average (46 to 49 Celsius), and it will be almost as hot in the Central Valley--and even fairly warm in Yosemite.
You should take the coastal route instead, where it will be much more pleasant.
Take Interstate 5 north to Los Angeles, then switch to state Highway 1 when you get to Santa Monica. Take this north to US Highway 101 (you get to this road at Oxnard). Take this north as far as Paso Robles. At Paso Robles, take state highway 46 west through a valley of wineries, then head north on Highway 1 all the way to Carmel, Monterey, and Santa Cruz. From Santa Cruz, go north on state highway 17 to Interstate 280 (in San Jose), then go north on Interstate 280 all the way to San Francisco.
Along this route, stop and see the following places:
Mission Bay in San Diego
Old San Diego
Del Mar Racetrack (horse racing--takes place in the summer--Where the Surf meets the Turf)
Venice Beach or Santa Monica
Malibu (home of the movie stars)
Santa Barbara--nice pier, state street is nice, and be sure to go see the Mission (largest/nicest in California)
Solvang/Los Olivos--Solvang is an old Danish town, Los Olivos is the winery area made famous by the movie "Sideways"--the best wineries in the area are just northwest of Los Olivos--and the restaurants in town are good ones.
Wineries along Highway 46 just outside of Paso Robles
Cambria--on highway 1--very pretty town and be sure to go to Moonstone Beach (gorgeous)
Hearst Castle--buy your tickets online a week ahead--because they sell out in the summertime
Carmel--another pretty town
Monterey---almost right next door, but much more touristy--visit Cannery Row, the fisherman's wharf (new one), and the world famous aquarium
Santa Cruz--funky town that looks like it still lives in the 1960s--and they have a good pier and an amusement park right on the boardwalk
Optional side trip--to Big Basin Redwood State Park, just north of here
Winchester Mystery House--located in San Jose almost exactly where highway 17 and Interstate 280 meet--this house is unlike anything you've ever seen before--it was built to hide it's owner from the ghosts who she believed were after her--and was continuously built larger and larger over the course of 30 years
and, of course--see all the sights in San Francisco--Fisherman's Wharf, Chinatown, Golden Gate Bridge, Cable Cars, Little Italy, Union Square, etc.
Enjoy