Heat half the oil in a frying pan, add the onion and cook over a medium-high heat for 5 minutes until softened and beginning to turn golden. Remove and set aside. Heat the remaining oil in the pan, add the potato slices, rosemary and spices and cook, tossing and stirring frequently, for 10 minutes until softened and lightly golden.
Layer the potato slices in a large pie dish with the onions. Pour over the stock and season with salt and pepper.
Roll the pastry out on a lightly floured surface to about 1.5 cm (¾ inch) wider than the top of the pie dish. Cut a thin strip of pastry and place around the edge of the dish, pressing down with a little water to seal. Lightly brush the top of the strip with water, top with the pastry lid and press around the edges with a fork to seal. Make an incision in the centre of the pie for the steam to escape and lightly brush all over with the soya milk.
Bake in a preheated oven, 220°C (425°F), Gas Mark 7, for 25–30 minutes until the pastry is golden and the potatoes are tender. Serve hot.