Generative Diffusion From An Action Principle