The sun really doesn't matter. Are you building it from scratch? Build just like you would on the ground. Not quite sure I know what you are asking.
You can attach to the deck or to the house (my guess that's where the deck is located) or make it free standing supported around the deck.
If you can supply more details you can get a more applicable answer.
I have a deck (attached) that is the rear of my home that we use to come in and out of the rear. The rear door and door are hit with extreme heat in the summer. Also, rain and snow🤭
Can you add some additional information. I am confused by your question. Making an enclosed shed will naturally shade the area in and around the shed. What do you want to use the shed for?
Lauren - The Little Lake Cottage