lvignoli / typst-action

Typst GitHub action
MIT License
53 stars 10 forks source link

Cannot specify --font-path #9

Open msakuta opened 11 months ago

msakuta commented 11 months ago

Hi, it seems this example action in the description here doesn't work.

      with:
        source_file: euler-lagrange-jp.typ
        - name: Typst
          uses: lvignoli/typst-action@main
          with:
            source_file: main.typ
            options: |
              --font-path
              fonts

In my pipeline, the actual command executed seems like this (omitting irrelevant parameters to docker)

7   docker <blah..blah...> "euler-lagrange-jp.typ" "--font-path
8   fonts
9   "

which suggests that it's supposed to be like below, but the newline separated parameters actually go to the next command.

7   docker <blah..blah...> "euler-lagrange-jp.typ" "--font-path" "fonts"
lvignoli commented 11 months ago

Hi @msakuta, The action is out of date with the current typst CLI. I need to take some time to update, but this will not happen in the coming weeks. In the meantime, I suggest you try setup-typst as a replacement :)

leana8959 commented 5 months ago

Hello,

I just opened a PR, I basically just swapped the option so that options comes after the "compile filename.typ" part.

Hope this helps!

Lypsilonx commented 3 months ago

You can specify the environment variable like this:

- name: Typst
   uses: lvignoli/typst-action@main
      env:
         TYPST_FONT_PATHS: ./fonts
      with:
          source_file: |
             ...