To echo ACuriousMinds answer, there is a difference between formulating a boundary value problem and an initial value problem. Optimisation procedures in my mind are initial value problems. The principle of stationary action is a well-posed boundary condition problem. The equivalence of the two is not guaranteed and I am not confident that the stationary action principle can be formulated as an initial value problem.
I would welcome informed comments or corrections to this. For further reading please see the following post.
No, the principle of least action (more properly, the principle of stationary action) is not an algorithm. In particular, it doesn't have steps.
It just states that the physically realized path of any system is a critical point of the action functional, which equivalently means its Euler-Lagrange equations are the equations of motion.