1 of 2

How did this army get here?

During "The Dragon and the Wolf" (Game of Thrones, S07E07),

the Unsullied assemble outside King's Landing, and Greyworm appears in the delegation

but, as far as I remember, they were in Castely Rock, sieged by the Greyjoy fleet.

Did I miss something? How did they get out of that situation? Is it addressed in some extra that I have not watched?