Karma-yoga means doing an act with an intention to serve/contribute just because it is one’s duty/nature/swadharma/swabhava/prakrati to do so (the creative potentiality hard wired in us can only be satisfied if it is expressed) without taking the ownership of the result and accepting the result as prasad. Since laws of nature control the outcome, this attitude frees oneself of the pride associated with success or guilt associated with failure and makes one accept any result with grace. Now, what makes Karma-yoga lead to yoga or union? When mind is free from agitations, yoga automatically happens. Mental agitations are primarily caused by inaction and by uncertainty over result of an action due to desire/aversion towards a particular outcome. Karma-yoga prompts one to act and with Karma-yoga attitude the uncertainty over result no longer agitates the mind since any result is accepted with evenness of mind. As mind gradually quitens, yoga happens.