I have to think that the way to do this is just buy already roasted beans or roast your own (if you're set up to do it), cool them as per normal practice, and only then do the smoking.
In my mind, this would be a cold smoking procedure on the already-roasted beans so that you're not affecting the roast of the beans at all. You're just trying to deposit a layer of smoke onto the outsides of the beans so that when you grind and brew them, you get some smoke flavor in the final brew.
I'd just do a cold smoke, the same way I do cheese or butter, with the beans arranged the same way I do for nuts. Either on screens or pans with zillions of little holes so the smoke can get at them all.
All of the hand wringing about wrecking the beans by smoking them assumes that people are going to heat them up to some high temperature when smoking them. There's no need for that. Things smoke just great cold, or else we wouldn't have smoked cheeses and the like.
You just need a smoke generator that doesn't create a lot of heat. But again, that's what we all have to use when doing cheese, hard boiled eggs, butter, etc.
As for smoking the green beans before roasting: I don't think that would work as well. My feeling is that at the high temperatures used to actually roast beans, you might drive off the flavor components that you're looking to get from the smoking, or worse, cause them to break down into nasty-tasting compounds.
My sense is that when we smoke meat, even if the smoker is running at a high temperature so that it's cooking the food while it smokes it, the food itself is never at such high surface temperatures as you'd encounter when roasting coffee beans. So the smoke deposits or condenses on the surface of our food, and remains there and doesn't break down. But at the high coffee roasting temperatures, it might be driven off or converted into bad tasting compounds.
So again, I'd imagine that it would be best to cold smoke or at most warm smoke the already-roasted coffee beans. I've got to try this, by the way!