Building muscle on a bicycle is much the same as doing weights in a gym. In the gym, there is a method to determine the 'starting point' of each exercise for the person who has never lifted weights before.
Let's take for example the Squat, preferebly on a Smith machine.
Warm up by doing 20 reps at minimum weight ( bar only ).
Warm up a bit more by increasing the total weight by half the weight of the bar.
There is a logic sequence to follow where =IF( Reps>=2, increase weight by 10%, increase weight by 10% ) until weight is added where the client can only manage ONE repetition. This is called 1RF or One Rep to Failure.
The starting weight for the client's next session will be 75% of his/her 1RP.
Relate that to a bike. Climb a hill to failure. Note the gear inches.
At the next attempt, use a gear which is 75% of the length.
eg. On a 12% hill, the cyclist failed on a 48" gear. Next weekend, use a 36" gear.
No prizes for saying 36" up a 12% is for a 25lb bike
A short amount of strain like this will not damage your knee ligaments and tendons. In fact, it will encourage them to strengthen in sympathy with your muscles.