Certified GKH Gardening Expert
If you are seeing ants, it probably means you have an aphid problem. the ants are not a problem, but the aphids are. Once the aphids are treated, the ants will leave too. Here is some information on treating aphids:
https://www.gardeningknowhow.com/plant-problems/pests/homemade-aphid-control-a-natural-way-to-kill-aphids.htm
https://www.gardeningknowhow.com/plant-problems/pests/pesticides/neem-oil-uses.htm
If you do not feel this is the problem or if they are attacking your fig fruit, then as an alternative, you can try some of the methods listed in the following article. This is meant for vines, but will work on trees to:
https://www.gardeningknowhow.com/plant-problems/pests/keeping-ants-of-flowering-vines-vegetables-and-flowers.htm