Web while not the cheapest method, sprinkling ground cinnamon along the perimeter of your garden (or any surface area, for that matter) will repel ants, but not kill.
Diy vegetable garden fence animals
Diy mesh vegetable garden
Diy small vegetable garden layout