A heck of a lot of trial and error on your part just joking, but really, using army deploy to make straight walls is not a simple task
If you do not know how to make a proper trigger please visit here firstTo use Army Deploy Effect you need to do these 5 steps or 5 similar to them.
An army to deploy for ease to the situation, to create an army, select one unit from the player that you want to have the army, and then click Make. (The Show Button will confirm that you have created an army for that player.) Next you need a Protounit just use the drag down menu to find the building or unit you want to create (Sadly the name might not be the exact same as you see whilst playing ex. Son of Osiris is called a Pharaoh of Osiris) The set area button works by left clicking on it and then left clicking on the exact spot you need the building to be placed ( This can be tricky on some pitch angles, 90 works the best), to confirm the area is set where you want it to be, click Show Area Count= The number of units you want to deploy. You have no control on the arrangement, so in the case of walls you will most likely have to do one wall per Deploy Effect. Heading= 0-359 degrees of a circle. a Heading of 0 will make the default position of any building in a normal game. I wish you best of luck, and will offer you one more tid bit of advice, using the terrain grid will probably help you immensely.