ImageMagick: unable to read font

I was about to integrate Github Actions to one of my pet projects but the tests failed with:

convert-im6.q16: unable to read font `helvetica' @ error/annotate.c/RenderFreetype/1338.

In the project i was using ImageMagick convert command directly as sub process and obviously some fonts where missing.
Makes sense because i used convert to add text to an image.

So how do i add missing fonts?
First lets see what fonts are installed, i tried this locally:

convert -list font
Code language: PHP (php)

For Helvetica it showed:

   Font: Helvetica
    family: Helvetica
    style: Normal
    stretch: Normal
    weight: 400
    glyphs: /usr/share/fonts/type1/gsfonts/n019003l.pfb

In Github Actions there were no such path, so it seems that gsfonts was missing.
And indeed gsfonts needs to be added, so lets install it:

- name: 'install deps' run: "sudo apt install -y libfreetype6-dev gsfonts libmagickwand-dev imagemagick"
Code language: JavaScript (javascript)

Now Github actions pass, nice.