Which means it can be done as either part of an action or bonus action.
Wrong. In 5e something is ether an action or a bonus action. You cannot use an action to carry out a bonus action, you cannot use a bonus action to carry out an action. Only special class abilities allow a character to do something using either.
From 5e Sage Advice:
Actions and bonus actions aren't interchangeable. In the example, the bard could use Bardic Inspiration or healing word on a turn, but not both.
WotC Sage Advice compendium.