Decks and Electricity
At Least One Receptacle
There must be at least one receptacle outlet installed outside at the front and back of the house that has direct access to the ground surface.
At least one electric receptacle outlet must be readily accessible from grade level and located not more than 6 feet 6 inches (1981 mm) above grade, and it must be installed outdoors at the front and back of each dwelling unit having direct access to grade level.
There should be an electric receptacle at the front of the house, because there is access to grade level from the required egress door (front door). If the house has access to the grade level in the rear of the house, then another receptacle is required there too.
Receptacle at a Deck
The 2020 NEC (National Electrical Code) requires that any deck within 4 inches of the house (presumably serving it) requires an electric receptacle to be accessible from that deck. Balconies, decks, and porches that are within 4 inches (102 mm) horizontally of the dwelling unit must have at least one receptacle outlet accessible from the balcony, deck, or porch.
The receptacle shall be located not more than 6 feet 6 inches (1981 mm) above the balcony, deck, or porch surface.
To protect people, GFCI protection must be installed at all 125- through 250-volt receptacles installed outdoors and supplied by single-phase branch circuits rated 150 volts or less to ground must have GFCI-protection. All exterior receptacles should be GFCI-protected. There's one exception for outdoor receptacles not readily accessible for snow-melting or deicing. But personally, I would still recommend GFCI-protection.
The illustration is a weatherproof receptacle cover.
In damp or wet locations, boxes, conduit bodies, and fittings should be located or equipped to prevent moisture from entering the box, conduit body, or fitting.
Boxes, conduit bodies, and fittings installed in wet locations should be listed for use in wet locations.
If an inspector observes an outdoor receptacle and the box is mounted on the surface, it should be listed for that purpose. Common boxes are Type FS or FD. The box cover should be installed with a gasket to parent moisture intrusion.
Receptacles installed in damp locations and protected from the weather (like under a roofed open porch) or located in other damp locations must have an enclosure that is weatherproof (or weathertight) when the receptacle cover is closed, and an attachment plug is not inserted.
This is a picture of a weatherproof box with a GFCI receptacle, and an attachment plug is connected while the cover is closed.
A receptacle installed in a wet location (exposed to the weather) must have an enclosure that is weatherproof whether or not an attachment plug is inserted. These receptacle covers provide sealed weather protection even when cords are plugged into the receptacle.
An overhead electric service conductor that is connected to a house must be at least 3 feet (914 mm) horizontally from the edge of a deck. Refer to 2021 IRC E3604.1.
When overhead service entrance conductors are within 3 feet (314 mm) horizontally from the edge of a deck, they must be at least 10 feet (3048 mm) above the walking surface of the deck.
Sometimes the inspector will inspect a new house and the service cable may meet the code on that day by being 12 feet (3658 mm) above a the rear yard. But then a new deck is built under that cable, and the clearance is reduced to a hazardous inadequate clearance.
Information used with permission of nachi.org