Answer
Please see the work below.
Work Step by Step
We consider the lower point of swing at ground position; the work will be done against gravity with respect to ground position.
$Work \space done=mgh$
As $\Delta h=L_Lcos{\phi}$
$\implies Work\space done=mgL(1-cos{\phi})$