It has been done on a small scale by model engineers and steampunk enthusiasts. Here are a couple of examples:
How to Use Real Steam Power For... Robots?
The author, Austin Sirkin, sounds a note of caution:
First off, let me say this—using real steam power is dangerous, and
heavy, and just generally not worth it when you have modern
alternatives. Except, you know, if you're a Steampunk.
He goes on to say that things like the quadrupedal walking robot created by I-Wei Huang and shown in the video accompanying the article can be built with the aid of a laser cutter, necessary to cut gearworks, axles, belts and "other mechanical methods of delivering power from one place to another" with sufficient precision to stop the machine vibrating to bits. Then he warns again that unless you know exactly what you are doing to attempt to build a steam engine is extremely dangerous, but fortunately there are plenty of reliable ready-built small steam engines for sale.
Via the above I found a second article which introduces a very elegant steam powered hexapod robot built by "Professeur Shadoko":
Meet the Steam Ant: A Steampunk-Inspired Hexapod Robot That's Actually Powered by Steam!
Inspired by the Steam Walker by Crabfu Steamworks, Professeur Shadoko
of French DIY blog Brico Bidules built this awesome steampunk Steam
Ant that's powered by a steam engine, complete with smoke stack!
The engine is a steam boiler that uses a small, dual-acting cylinder.
It's heated with Esbit hexamine fuel tablets, which don't produce any
smoke or ashes. The legs are made of brass tubes, which are attached
to gears, with extruded aluminum feet.
Whether these small devices built for fun could practically be scaled up in size and complexity so that they could perform the more traditional SF functions of a robot, such as domestic service or fighting giant alien mecha, is another question.
LATER EDIT: I passed the question to someone I know who is into model engineering and steam engines, and he adds the following thoughts:
"For a steam powered robot you will need some material to burn to provide the heat. Lump coal is too bulky. You could try vapourized diesel fuel or coal dust on a fluidized bed. Use steam jets to control combustion. Or, to provide even more heat, you could use the sort of materials that are suitable for rocket fuel such as a liquid hydrogen-oxygen burn, hydrazine or plastic chips burning in nitrogen oxide.
"Use stainless steel to make the boiler. For that quantity of heat you will need to use “flash steam”. This means high speed steam generation done not in a boiler but in a tube network. Spiral stainless steel tubes would probably be best.
"Water will not do as the matter to be vapourized. Try freon or another chlorofluorocarbon, as used in fridges. Liquid chlorine might be possible. Or, for real heat, use liquid sodium in an extreme high pressure heater.
"The biggest decision is whether you are going to move the robot’s limbs by using steam for reciprocating pistons or turbines. With turbines you need a lot of gearing down, because you need to spin turbines at high speed. For pistons you could use direct muscle effect. A double-acting piston would provide bi-directional movement of a limb via a system of levers.
"One way you could “cheat” is to simply use steam to power a dynamo, thus making a steam-electric robot.
"It would be most appropriate to have the robot controlled by a Difference Engine as designed by Charles Babbage, but this would need to be quite large. Assuming the robot is controlled by a modern-style computer, the computer will need an electrical supply. To use an off the shelf battery would be crass. You could act more in the spirit of the genre by placing a steam-powered generator somewhere on the robot, or there could be a thermoelectric generator. The latter would require one end of the thermocouple to be kept cold. This could be done by massive radiating fins, or a cooling fan, or both. The electrical supply could be used to charge up an accumulator of sorts.
"By the way, one of Harry Harrison’s Stainless Steel Rat books featured steam powered robots on a world whose technology had regressed. They occasionally had to stop whatever they were doing in order to shovel coal in their tummies. However this was not an entirely realistic presentation of the concept."