Alternating Triangles
Husk, 12 bytes

↔↑ṁe"|"¡Θ" /


Try it online!

Builds the infinite triangle upside-down, then takes the required number of lines and reverses them before printing.

Explanation

↔↑ṁe"|"¡Θ" /
       ¡        Repeat and accumulate results:
        Θ          prepend a space
         " /       starting from the string " /"
                   (this will create all the lines of the slanted side)
  ṁ             For each line:
   e"|"            put it in a list with a "|" line
  ṁ             and merge all these lists together
 ↑              Take the number of lines required by the input
↔               Reverse the result