What are the best practices of button alignment?

There are reasons to align buttons to the left, center, or right. What are the best practices of button alignment and what factors should we consider? Which buttons should be on the left, center, and right?

Personally, I base my judgements on the f-shaped reading pattern ,horizontal attention and platform conventions. However, I haven't found a complete list of rules that would tell me where to align each type of button in each context.