The buoyancy-driven motion of a deformable bubble rising near a vertical hydrophilic wall is studied numerically. We focus on moderately inertial regimes in which the bubble undergoes low-to-moderate deformations and would rise in a straight line in the absence of the wall. Three different types of near-wall motion are observed, depending on the buoyancy-to-viscous and buoyancy-to-capillary force ratios defining the Galilei (
$Ga$
) and Bond (
$Bo$
) numbers of the system, respectively. For low enough
$Ga$
or large enough
$Bo$
, bubbles consistently migrate away from the wall. Conversely, for large enough
$Ga$
and low enough
$Bo$
, they perform periodic near-wall bounces. At intermediate
$Ga$
and
$Bo$
, they are first attracted to the wall down to a certain critical distance, and then perform bounces with a decreasing amplitude before stabilising at this critical separation. Periodic bounces are accompanied by the shedding of a pair of streamwise vortices in the wake, the formation of which is governed by the near-wall shear resulting from the no-slip condition. These vortices provide a repulsive force that overcomes the viscous resistance of the fluid to the departing motion, making the bubble capable of returning to the region where it is attracted again to the wall. Although periodic, the shedding/regeneration cycle of these vortices is highly asymmetric with respect to the lateral bubble displacements, vortices being shed when the gap left between the bubble and the wall reaches its maximum, and reborn only when this gap comes back to its minimum.