Minecraft wiki entry for Water-powered_boat_transportation, associated text: 3. Place a button behind ("downhill") and diagonally up from each dirt block and from each step. Add more wall blocks to accommodate the buttons.
4. Place a water block on the wall block diagonally up ("downhill") from each dirt block. Each wall block that gets a water block is indicated by a torch.